ffmpeg.c:2987: error: Null Dereference
  pointer `st` last assigned on line 2982 could be null and is dereferenced at line 2987, column 35.

ffmpeg.c:2976:1: start of procedure new_video_stream()
2974. }
2975. 
2976. static void new_video_stream(AVFormatContext *oc)
      ^
2977. {
2978.     AVStream *st;

ffmpeg.c:2982:5: 
2980.     int codec_id;
2981. 
2982.     st = av_new_stream(oc, oc->nb_streams);
          ^
2983.     if (!st) {
2984.         fprintf(stderr, "Could not alloc stream\n");

libavformat/utils.c:2247:1: start of procedure av_new_stream()
  2245. }
  2246. 
  2247. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2248. {
  2249.     AVStream *st;

libavformat/utils.c:2252:9: Taking true branch
  2250.     int i;
  2251. 
  2252.     if (s->nb_streams >= MAX_STREAMS)
                ^
  2253.         return NULL;
  2254. 

libavformat/utils.c:2253:9: 
  2251. 
  2252.     if (s->nb_streams >= MAX_STREAMS)
  2253.         return NULL;
                ^
  2254. 
  2255.     st = av_mallocz(sizeof(AVStream));

libavformat/utils.c:2283:1: return from a call to av_new_stream
  2281.     s->streams[s->nb_streams++] = st;
  2282.     return st;
  2283. }
        ^
  2284. 
  2285. AVProgram *av_new_program(AVFormatContext *ac, int id)

ffmpeg.c:2983:10: Taking true branch
2981. 
2982.     st = av_new_stream(oc, oc->nb_streams);
2983.     if (!st) {
               ^
2984.         fprintf(stderr, "Could not alloc stream\n");
2985.         av_exit(1);

ffmpeg.c:2984:9: 
2982.     st = av_new_stream(oc, oc->nb_streams);
2983.     if (!st) {
2984.         fprintf(stderr, "Could not alloc stream\n");
              ^
2985.         av_exit(1);
2986.     }

ffmpeg.c:2985:9: Skipping av_exit(): empty list of specs
2983.     if (!st) {
2984.         fprintf(stderr, "Could not alloc stream\n");
2985.         av_exit(1);
              ^
2986.     }
2987.     avcodec_get_context_defaults2(st->codec, CODEC_TYPE_VIDEO);

ffmpeg.c:2987:5: 
2985.         av_exit(1);
2986.     }
2987.     avcodec_get_context_defaults2(st->codec, CODEC_TYPE_VIDEO);
          ^
2988.     bitstream_filters[nb_output_files][oc->nb_streams - 1]= video_bitstream_filters;
2989.     video_bitstream_filters= NULL;
