ffmpeg.c:3069: error: Null Dereference
  pointer `input_files_ts_scale[nb_input_files]` last assigned on line 3068 could be null and is dereferenced at line 3069, column 5.

ffmpeg.c:3054:1: start of procedure opt_input_ts_scale()
3052. }
3053. 
3054. static void opt_input_ts_scale(const char *arg)
      ^
3055. {
3056.     unsigned int stream;

ffmpeg.c:3060:5: 
3058.     char *p;
3059. 
3060.     stream = strtol(arg, &p, 0);
          ^
3061.     if (*p)
3062.         p++;

ffmpeg.c:3061:9: Taking true branch
3059. 
3060.     stream = strtol(arg, &p, 0);
3061.     if (*p)
              ^
3062.         p++;
3063.     scale= strtod(p, &p);

ffmpeg.c:3062:9: 
3060.     stream = strtol(arg, &p, 0);
3061.     if (*p)
3062.         p++;
              ^
3063.     scale= strtod(p, &p);
3064. 

ffmpeg.c:3063:5: 
3061.     if (*p)
3062.         p++;
3063.     scale= strtod(p, &p);
          ^
3064. 
3065.     if(stream >= MAX_STREAMS)

ffmpeg.c:3065:8: Taking true branch
3063.     scale= strtod(p, &p);
3064. 
3065.     if(stream >= MAX_STREAMS)
             ^
3066.         ffmpeg_exit(1);
3067. 

ffmpeg.c:3066:9: Skipping ffmpeg_exit(): empty list of specs
3064. 
3065.     if(stream >= MAX_STREAMS)
3066.         ffmpeg_exit(1);
              ^
3067. 
3068.     input_files_ts_scale[nb_input_files] = grow_array(input_files_ts_scale[nb_input_files], sizeof(*input_files_ts_scale[nb_input_files]), &nb_input_files_ts_scale[nb_input_files], stream + 1);

ffmpeg.c:3068:5: 
3066.         ffmpeg_exit(1);
3067. 
3068.     input_files_ts_scale[nb_input_files] = grow_array(input_files_ts_scale[nb_input_files], sizeof(*input_files_ts_scale[nb_input_files]), &nb_input_files_ts_scale[nb_input_files], stream + 1);
          ^
3069.     input_files_ts_scale[nb_input_files][stream]= scale;
3070. }

ffmpeg.c:575:1: start of procedure grow_array()
  573. 
  574. /* similar to ff_dynarray_add() and av_fast_realloc() */
  575. static void *grow_array(void *array, int elem_size, int *size, int new_size)
       ^
  576. {
  577.     if (new_size >= INT_MAX / elem_size) {

ffmpeg.c:577:9: Taking true branch
  575. static void *grow_array(void *array, int elem_size, int *size, int new_size)
  576. {
  577.     if (new_size >= INT_MAX / elem_size) {
               ^
  578.         fprintf(stderr, "Array too big.\n");
  579.         ffmpeg_exit(1);

ffmpeg.c:578:9: 
  576. {
  577.     if (new_size >= INT_MAX / elem_size) {
  578.         fprintf(stderr, "Array too big.\n");
               ^
  579.         ffmpeg_exit(1);
  580.     }

ffmpeg.c:579:9: Skipping ffmpeg_exit(): empty list of specs
  577.     if (new_size >= INT_MAX / elem_size) {
  578.         fprintf(stderr, "Array too big.\n");
  579.         ffmpeg_exit(1);
               ^
  580.     }
  581.     if (*size < new_size) {

ffmpeg.c:581:9: Taking true branch
  579.         ffmpeg_exit(1);
  580.     }
  581.     if (*size < new_size) {
               ^
  582.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
  583.         if (!tmp) {

ffmpeg.c:582:9: 
  580.     }
  581.     if (*size < new_size) {
  582.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
               ^
  583.         if (!tmp) {
  584.             fprintf(stderr, "Could not alloc buffer.\n");

libavutil/mem.c:119:1: start of procedure av_realloc()
    117. }
    118. 
    119. void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size)
         ^
    120. {
    121. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:126:8: Taking false branch
    124. 
    125.     /* let's disallow possible ambiguous cases */
    126.     if(size > (INT_MAX-16) )
                ^
    127.         return NULL;
    128. 

libavutil/mem.c:135:5: 
    133.     return (char*)realloc((char*)ptr - diff, size + diff) + diff;
    134. #else
    135.     return realloc(ptr, size);
             ^
    136. #endif
    137. }

libavutil/mem.c:137:1: return from a call to av_realloc
    135.     return realloc(ptr, size);
    136. #endif
    137. }
         ^
    138. 
    139. void av_free(void *ptr)

ffmpeg.c:583:14: Taking true branch
  581.     if (*size < new_size) {
  582.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
  583.         if (!tmp) {
                    ^
  584.             fprintf(stderr, "Could not alloc buffer.\n");
  585.             ffmpeg_exit(1);

ffmpeg.c:584:13: 
  582.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
  583.         if (!tmp) {
  584.             fprintf(stderr, "Could not alloc buffer.\n");
                   ^
  585.             ffmpeg_exit(1);
  586.         }

ffmpeg.c:585:13: Skipping ffmpeg_exit(): empty list of specs
  583.         if (!tmp) {
  584.             fprintf(stderr, "Could not alloc buffer.\n");
  585.             ffmpeg_exit(1);
                   ^
  586.         }
  587.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);

ffmpeg.c:587:9: 
  585.             ffmpeg_exit(1);
  586.         }
  587.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
               ^
  588.         *size = new_size;
  589.         return tmp;

ffmpeg.c:588:9: 
  586.         }
  587.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
  588.         *size = new_size;
               ^
  589.         return tmp;
  590.     }

ffmpeg.c:589:9: 
  587.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
  588.         *size = new_size;
  589.         return tmp;
               ^
  590.     }
  591.     return array;

ffmpeg.c:592:1: return from a call to grow_array
  590.     }
  591.     return array;
  592. }
       ^
  593. 
  594. static void choose_sample_fmt(AVStream *st, AVCodec *codec)

ffmpeg.c:3069:5: 
3067. 
3068.     input_files_ts_scale[nb_input_files] = grow_array(input_files_ts_scale[nb_input_files], sizeof(*input_files_ts_scale[nb_input_files]), &nb_input_files_ts_scale[nb_input_files], stream + 1);
3069.     input_files_ts_scale[nb_input_files][stream]= scale;
          ^
3070. }
3071. 
