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

ffmpeg.c:3064:1: start of procedure opt_input_ts_scale()
3062. }
3063. 
3064. static int opt_input_ts_scale(const char *opt, const char *arg)
      ^
3065. {
3066.     unsigned int stream;

ffmpeg.c:3070:5: 
3068.     char *p;
3069. 
3070.     stream = strtol(arg, &p, 0);
          ^
3071.     if (*p)
3072.         p++;

ffmpeg.c:3071:9: Taking false branch
3069. 
3070.     stream = strtol(arg, &p, 0);
3071.     if (*p)
              ^
3072.         p++;
3073.     scale= strtod(p, &p);

ffmpeg.c:3073:5: 
3071.     if (*p)
3072.         p++;
3073.     scale= strtod(p, &p);
          ^
3074. 
3075.     if(stream >= MAX_STREAMS)

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

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

ffmpeg.c:519:1: start of procedure grow_array()
  517. 
  518. /* similar to ff_dynarray_add() and av_fast_realloc() */
  519. static void *grow_array(void *array, int elem_size, int *size, int new_size)
       ^
  520. {
  521.     if (new_size >= INT_MAX / elem_size) {

ffmpeg.c:521:9: Taking true branch
  519. static void *grow_array(void *array, int elem_size, int *size, int new_size)
  520. {
  521.     if (new_size >= INT_MAX / elem_size) {
               ^
  522.         fprintf(stderr, "Array too big.\n");
  523.         ffmpeg_exit(1);

ffmpeg.c:522:9: 
  520. {
  521.     if (new_size >= INT_MAX / elem_size) {
  522.         fprintf(stderr, "Array too big.\n");
               ^
  523.         ffmpeg_exit(1);
  524.     }

ffmpeg.c:523:9: Skipping ffmpeg_exit(): empty list of specs
  521.     if (new_size >= INT_MAX / elem_size) {
  522.         fprintf(stderr, "Array too big.\n");
  523.         ffmpeg_exit(1);
               ^
  524.     }
  525.     if (*size < new_size) {

ffmpeg.c:525:9: Taking true branch
  523.         ffmpeg_exit(1);
  524.     }
  525.     if (*size < new_size) {
               ^
  526.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
  527.         if (!tmp) {

ffmpeg.c:526:9: 
  524.     }
  525.     if (*size < new_size) {
  526.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
               ^
  527.         if (!tmp) {
  528.             fprintf(stderr, "Could not alloc buffer.\n");

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

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

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

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

ffmpeg.c:527:14: Taking true branch
  525.     if (*size < new_size) {
  526.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
  527.         if (!tmp) {
                    ^
  528.             fprintf(stderr, "Could not alloc buffer.\n");
  529.             ffmpeg_exit(1);

ffmpeg.c:528:13: 
  526.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
  527.         if (!tmp) {
  528.             fprintf(stderr, "Could not alloc buffer.\n");
                   ^
  529.             ffmpeg_exit(1);
  530.         }

ffmpeg.c:529:13: Skipping ffmpeg_exit(): empty list of specs
  527.         if (!tmp) {
  528.             fprintf(stderr, "Could not alloc buffer.\n");
  529.             ffmpeg_exit(1);
                   ^
  530.         }
  531.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);

ffmpeg.c:531:9: 
  529.             ffmpeg_exit(1);
  530.         }
  531.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
               ^
  532.         *size = new_size;
  533.         return tmp;

ffmpeg.c:532:9: 
  530.         }
  531.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
  532.         *size = new_size;
               ^
  533.         return tmp;
  534.     }

ffmpeg.c:533:9: 
  531.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
  532.         *size = new_size;
  533.         return tmp;
               ^
  534.     }
  535.     return array;

ffmpeg.c:536:1: return from a call to grow_array
  534.     }
  535.     return array;
  536. }
       ^
  537. 
  538. static void choose_sample_fmt(AVStream *st, AVCodec *codec)

ffmpeg.c:3079:5: 
3077. 
3078.     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);
3079.     input_files_ts_scale[nb_input_files][stream]= scale;
          ^
3080.     return 0;
3081. }
