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

ffmpeg.c:3425:1: start of procedure new_video_stream()
3423. }
3424. 
3425. static void new_video_stream(AVFormatContext *oc, int file_idx)
      ^
3426. {
3427.     AVStream *st;

ffmpeg.c:3430:5: 
3428.     AVOutputStream *ost;
3429.     AVCodecContext *video_enc;
3430.     enum CodecID codec_id = CODEC_ID_NONE;
          ^
3431.     AVCodec *codec= NULL;
3432. 

ffmpeg.c:3431:5: 
3429.     AVCodecContext *video_enc;
3430.     enum CodecID codec_id = CODEC_ID_NONE;
3431.     AVCodec *codec= NULL;
          ^
3432. 
3433.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);

ffmpeg.c:3433:28: Condition is true
3431.     AVCodec *codec= NULL;
3432. 
3433.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
                                 ^
3434.     if (!st) {
3435.         fprintf(stderr, "Could not alloc stream\n");

ffmpeg.c:3433:5: 
3431.     AVCodec *codec= NULL;
3432. 
3433.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
          ^
3434.     if (!st) {
3435.         fprintf(stderr, "Could not alloc stream\n");

libavformat/utils.c:2642:1: start of procedure av_new_stream()
  2640. }
  2641. 
  2642. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2643. {
  2644.     AVStream *st;

libavformat/utils.c:2648:9: Taking true branch
  2646.     AVStream **streams;
  2647. 
  2648.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
                ^
  2649.         return NULL;
  2650.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));

libavformat/utils.c:2649:9: 
  2647. 
  2648.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
  2649.         return NULL;
                ^
  2650.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));
  2651.     if (!streams)

libavformat/utils.c:2691:1: return from a call to av_new_stream
  2689.     s->streams[s->nb_streams++] = st;
  2690.     return st;
  2691. }
        ^
  2692. 
  2693. AVProgram *av_new_program(AVFormatContext *ac, int id)

ffmpeg.c:3434:10: Taking true branch
3432. 
3433.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3434.     if (!st) {
               ^
3435.         fprintf(stderr, "Could not alloc stream\n");
3436.         ffmpeg_exit(1);

ffmpeg.c:3435:9: 
3433.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3434.     if (!st) {
3435.         fprintf(stderr, "Could not alloc stream\n");
              ^
3436.         ffmpeg_exit(1);
3437.     }

ffmpeg.c:3436:9: Skipping ffmpeg_exit(): empty list of specs
3434.     if (!st) {
3435.         fprintf(stderr, "Could not alloc stream\n");
3436.         ffmpeg_exit(1);
              ^
3437.     }
3438.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3438:5: Skipping new_output_stream(): empty list of specs
3436.         ffmpeg_exit(1);
3437.     }
3438.     ost = new_output_stream(oc, file_idx);
          ^
3439. 
3440.     if(!video_stream_copy){

ffmpeg.c:3440:9: Taking true branch
3438.     ost = new_output_stream(oc, file_idx);
3439. 
3440.     if(!video_stream_copy){
              ^
3441.         if (video_codec_name) {
3442.             codec_id = find_codec_or_die(video_codec_name, AVMEDIA_TYPE_VIDEO, 1,

ffmpeg.c:3441:13: Taking true branch
3439. 
3440.     if(!video_stream_copy){
3441.         if (video_codec_name) {
                  ^
3442.             codec_id = find_codec_or_die(video_codec_name, AVMEDIA_TYPE_VIDEO, 1,
3443.                                          avcodec_opts[AVMEDIA_TYPE_VIDEO]->strict_std_compliance);

ffmpeg.c:3442:13: 
3440.     if(!video_stream_copy){
3441.         if (video_codec_name) {
3442.             codec_id = find_codec_or_die(video_codec_name, AVMEDIA_TYPE_VIDEO, 1,
                  ^
3443.                                          avcodec_opts[AVMEDIA_TYPE_VIDEO]->strict_std_compliance);
3444.             codec = avcodec_find_encoder_by_name(video_codec_name);

ffmpeg.c:3124:1: start of procedure find_codec_or_die()
  3122. }
  3123. 
  3124. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
        ^
  3125. {
  3126.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3126:32: Condition is true
  3124. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
  3125. {
  3126.     const char *codec_string = encoder ? "encoder" : "decoder";
                                       ^
  3127.     AVCodec *codec;
  3128. 

ffmpeg.c:3126:5: 
  3124. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
  3125. {
  3126.     const char *codec_string = encoder ? "encoder" : "decoder";
            ^
  3127.     AVCodec *codec;
  3128. 

ffmpeg.c:3129:9: Taking false branch
  3127.     AVCodec *codec;
  3128. 
  3129.     if(!name)
                ^
  3130.         return CODEC_ID_NONE;
  3131.     codec = encoder ?

ffmpeg.c:3131:13: Condition is true
  3129.     if(!name)
  3130.         return CODEC_ID_NONE;
  3131.     codec = encoder ?
                    ^
  3132.         avcodec_find_encoder_by_name(name) :
  3133.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3131:5: 
  3129.     if(!name)
  3130.         return CODEC_ID_NONE;
  3131.     codec = encoder ?
            ^
  3132.         avcodec_find_encoder_by_name(name) :
  3133.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3134:9: Taking false branch
  3132.         avcodec_find_encoder_by_name(name) :
  3133.         avcodec_find_decoder_by_name(name);
  3134.     if(!codec) {
                ^
  3135.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
  3136.         ffmpeg_exit(1);

ffmpeg.c:3138:8: Taking false branch
  3136.         ffmpeg_exit(1);
  3137.     }
  3138.     if(codec->type != type) {
               ^
  3139.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
  3140.         ffmpeg_exit(1);

ffmpeg.c:3142:8: Taking false branch
  3140.         ffmpeg_exit(1);
  3141.     }
  3142.     if(codec->capabilities & CODEC_CAP_EXPERIMENTAL &&
               ^
  3143.        strict > FF_COMPLIANCE_EXPERIMENTAL) {
  3144.         fprintf(stderr, "%s '%s' is experimental and might produce bad "

ffmpeg.c:3155:5: 
  3153.         ffmpeg_exit(1);
  3154.     }
  3155.     return codec->id;
            ^
  3156. }
  3157. 

ffmpeg.c:3156:1: return from a call to find_codec_or_die
  3154.     }
  3155.     return codec->id;
  3156. }
        ^
  3157. 
  3158. static int opt_input_file(const char *opt, const char *filename)

ffmpeg.c:3444:13: Skipping avcodec_find_encoder_by_name(): empty list of specs
3442.             codec_id = find_codec_or_die(video_codec_name, AVMEDIA_TYPE_VIDEO, 1,
3443.                                          avcodec_opts[AVMEDIA_TYPE_VIDEO]->strict_std_compliance);
3444.             codec = avcodec_find_encoder_by_name(video_codec_name);
                  ^
3445.             ost->enc = codec;
3446.         } else {

ffmpeg.c:3445:13: 
3443.                                          avcodec_opts[AVMEDIA_TYPE_VIDEO]->strict_std_compliance);
3444.             codec = avcodec_find_encoder_by_name(video_codec_name);
3445.             ost->enc = codec;
                  ^
3446.         } else {
3447.             codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO);

ffmpeg.c:3451:9: 
3449.         }
3450. 
3451.         ost->frame_aspect_ratio = frame_aspect_ratio;
              ^
3452.         frame_aspect_ratio = 0;
3453. #if CONFIG_AVFILTER

ffmpeg.c:3452:9: 
3450. 
3451.         ost->frame_aspect_ratio = frame_aspect_ratio;
3452.         frame_aspect_ratio = 0;
              ^
3453. #if CONFIG_AVFILTER
3454.         ost->avfilter= vfilters;

ffmpeg.c:3454:9: 
3452.         frame_aspect_ratio = 0;
3453. #if CONFIG_AVFILTER
3454.         ost->avfilter= vfilters;
              ^
3455.         vfilters = NULL;
3456. #endif

ffmpeg.c:3455:9: 
3453. #if CONFIG_AVFILTER
3454.         ost->avfilter= vfilters;
3455.         vfilters = NULL;
              ^
3456. #endif
3457.     }

ffmpeg.c:3459:5: 
3457.     }
3458. 
3459.     avcodec_get_context_defaults3(st->codec, codec);
          ^
3460.     ost->bitstream_filters = video_bitstream_filters;
3461.     video_bitstream_filters= NULL;
