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

ffmpeg.c:3061:1: start of procedure opt_input_ts_scale()
3059. }
3060. 
3061. static void opt_input_ts_scale(const char *arg)
      ^
3062. {
3063.     unsigned int stream;

ffmpeg.c:3067:5: 
3065.     char *p;
3066. 
3067.     stream = strtol(arg, &p, 0);
          ^
3068.     if (*p)
3069.         p++;

ffmpeg.c:3068:9: Taking true branch
3066. 
3067.     stream = strtol(arg, &p, 0);
3068.     if (*p)
              ^
3069.         p++;
3070.     scale= strtod(p, &p);

ffmpeg.c:3069:9: 
3067.     stream = strtol(arg, &p, 0);
3068.     if (*p)
3069.         p++;
              ^
3070.     scale= strtod(p, &p);
3071. 

ffmpeg.c:3070:5: 
3068.     if (*p)
3069.         p++;
3070.     scale= strtod(p, &p);
          ^
3071. 
3072.     if(stream >= MAX_STREAMS)

ffmpeg.c:3072:8: Taking true branch
3070.     scale= strtod(p, &p);
3071. 
3072.     if(stream >= MAX_STREAMS)
             ^
3073.         ffmpeg_exit(1);
3074. 

ffmpeg.c:3073:9: Skipping ffmpeg_exit(): empty list of specs
3071. 
3072.     if(stream >= MAX_STREAMS)
3073.         ffmpeg_exit(1);
              ^
3074. 
3075.     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:3075:5: 
3073.         ffmpeg_exit(1);
3074. 
3075.     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);
          ^
3076.     input_files_ts_scale[nb_input_files][stream]= scale;
3077. }

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

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

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

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

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

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

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

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

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

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

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

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

ffmpeg.c:3076:5: 
3074. 
3075.     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);
3076.     input_files_ts_scale[nb_input_files][stream]= scale;
          ^
3077. }
3078. 
