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

ffmpeg.c:2898:1: start of procedure opt_input_ts_scale()
2896. }
2897. 
2898. static void opt_input_ts_scale(const char *arg)
      ^
2899. {
2900.     unsigned int stream;

ffmpeg.c:2904:5: 
2902.     char *p;
2903. 
2904.     stream = strtol(arg, &p, 0);
          ^
2905.     if (*p)
2906.         p++;

ffmpeg.c:2905:9: Taking false branch
2903. 
2904.     stream = strtol(arg, &p, 0);
2905.     if (*p)
              ^
2906.         p++;
2907.     scale= strtod(p, &p);

ffmpeg.c:2907:5: 
2905.     if (*p)
2906.         p++;
2907.     scale= strtod(p, &p);
          ^
2908. 
2909.     if(stream >= MAX_STREAMS)

ffmpeg.c:2909:8: Taking true branch
2907.     scale= strtod(p, &p);
2908. 
2909.     if(stream >= MAX_STREAMS)
             ^
2910.         ffmpeg_exit(1);
2911. 

ffmpeg.c:2910:9: Skipping ffmpeg_exit(): empty list of specs
2908. 
2909.     if(stream >= MAX_STREAMS)
2910.         ffmpeg_exit(1);
              ^
2911. 
2912.     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:2912:5: 
2910.         ffmpeg_exit(1);
2911. 
2912.     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);
          ^
2913.     input_files_ts_scale[nb_input_files][stream]= scale;
2914. }

ffmpeg.c:566:1: start of procedure grow_array()
  564. 
  565. /* similar to ff_dynarray_add() and av_fast_realloc() */
  566. static void *grow_array(void *array, int elem_size, int *size, int new_size)
       ^
  567. {
  568.     if (new_size >= INT_MAX / elem_size) {

ffmpeg.c:568:9: Taking true branch
  566. static void *grow_array(void *array, int elem_size, int *size, int new_size)
  567. {
  568.     if (new_size >= INT_MAX / elem_size) {
               ^
  569.         fprintf(stderr, "Array too big.\n");
  570.         ffmpeg_exit(1);

ffmpeg.c:569:9: 
  567. {
  568.     if (new_size >= INT_MAX / elem_size) {
  569.         fprintf(stderr, "Array too big.\n");
               ^
  570.         ffmpeg_exit(1);
  571.     }

ffmpeg.c:570:9: Skipping ffmpeg_exit(): empty list of specs
  568.     if (new_size >= INT_MAX / elem_size) {
  569.         fprintf(stderr, "Array too big.\n");
  570.         ffmpeg_exit(1);
               ^
  571.     }
  572.     if (*size < new_size) {

ffmpeg.c:572:9: Taking true branch
  570.         ffmpeg_exit(1);
  571.     }
  572.     if (*size < new_size) {
               ^
  573.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
  574.         if (!tmp) {

ffmpeg.c:573:9: 
  571.     }
  572.     if (*size < new_size) {
  573.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
               ^
  574.         if (!tmp) {
  575.             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, unsigned int size)
         ^
    120. {
    121. #if CONFIG_MEMALIGN_HACK

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

libavutil/mem.c:127:9: 
    125.     /* let's disallow possible ambiguous cases */
    126.     if(size > (INT_MAX-16) )
    127.         return NULL;
                 ^
    128. 
    129. #if CONFIG_MEMALIGN_HACK

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:574:14: Taking true branch
  572.     if (*size < new_size) {
  573.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
  574.         if (!tmp) {
                    ^
  575.             fprintf(stderr, "Could not alloc buffer.\n");
  576.             ffmpeg_exit(1);

ffmpeg.c:575:13: 
  573.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
  574.         if (!tmp) {
  575.             fprintf(stderr, "Could not alloc buffer.\n");
                   ^
  576.             ffmpeg_exit(1);
  577.         }

ffmpeg.c:576:13: Skipping ffmpeg_exit(): empty list of specs
  574.         if (!tmp) {
  575.             fprintf(stderr, "Could not alloc buffer.\n");
  576.             ffmpeg_exit(1);
                   ^
  577.         }
  578.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);

ffmpeg.c:578:9: 
  576.             ffmpeg_exit(1);
  577.         }
  578.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
               ^
  579.         *size = new_size;
  580.         return tmp;

ffmpeg.c:579:9: 
  577.         }
  578.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
  579.         *size = new_size;
               ^
  580.         return tmp;
  581.     }

ffmpeg.c:580:9: 
  578.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
  579.         *size = new_size;
  580.         return tmp;
               ^
  581.     }
  582.     return array;

ffmpeg.c:583:1: return from a call to grow_array
  581.     }
  582.     return array;
  583. }
       ^
  584. 
  585. static void choose_sample_fmt(AVStream *st, AVCodec *codec)

ffmpeg.c:2913:5: 
2911. 
2912.     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);
2913.     input_files_ts_scale[nb_input_files][stream]= scale;
          ^
2914. }
2915. 
