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

ffmpeg.c:3356:1: start of procedure new_video_stream()
3354. }
3355. 
3356. static void new_video_stream(AVFormatContext *oc)
      ^
3357. {
3358.     AVStream *st;

ffmpeg.c:3362:5: 
3360.     enum CodecID codec_id;
3361. 
3362.     st = av_new_stream(oc, streamid_map[oc->nb_streams]);
          ^
3363.     if (!st) {
3364.         fprintf(stderr, "Could not alloc stream\n");

libavformat/utils.c:2498:1: start of procedure av_new_stream()
  2496. }
  2497. 
  2498. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2499. {
  2500.     AVStream *st;

libavformat/utils.c:2503:9: Taking true branch
  2501.     int i;
  2502. 
  2503.     if (s->nb_streams >= MAX_STREAMS){
                ^
  2504.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2505.         return NULL;

libavformat/utils.c:2504:9: Skipping av_log(): empty list of specs
  2502. 
  2503.     if (s->nb_streams >= MAX_STREAMS){
  2504.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
                ^
  2505.         return NULL;
  2506.     }

libavformat/utils.c:2505:9: 
  2503.     if (s->nb_streams >= MAX_STREAMS){
  2504.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2505.         return NULL;
                ^
  2506.     }
  2507. 

libavformat/utils.c:2540:1: return from a call to av_new_stream
  2538.     s->streams[s->nb_streams++] = st;
  2539.     return st;
  2540. }
        ^
  2541. 
  2542. AVProgram *av_new_program(AVFormatContext *ac, int id)

ffmpeg.c:3363:10: Taking true branch
3361. 
3362.     st = av_new_stream(oc, streamid_map[oc->nb_streams]);
3363.     if (!st) {
               ^
3364.         fprintf(stderr, "Could not alloc stream\n");
3365.         ffmpeg_exit(1);

ffmpeg.c:3364:9: 
3362.     st = av_new_stream(oc, streamid_map[oc->nb_streams]);
3363.     if (!st) {
3364.         fprintf(stderr, "Could not alloc stream\n");
              ^
3365.         ffmpeg_exit(1);
3366.     }

ffmpeg.c:3365:9: Skipping ffmpeg_exit(): empty list of specs
3363.     if (!st) {
3364.         fprintf(stderr, "Could not alloc stream\n");
3365.         ffmpeg_exit(1);
              ^
3366.     }
3367.     avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_VIDEO);

ffmpeg.c:3367:5: 
3365.         ffmpeg_exit(1);
3366.     }
3367.     avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_VIDEO);
          ^
3368.     bitstream_filters[nb_output_files][oc->nb_streams - 1]= video_bitstream_filters;
3369.     video_bitstream_filters= NULL;
