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

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

ffmpeg.c:3428:5: 
3426.     OutputStream *ost;
3427.     AVCodecContext *video_enc;
3428.     enum CodecID codec_id = CODEC_ID_NONE;
          ^
3429.     AVCodec *codec= NULL;
3430. 

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

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

ffmpeg.c:3431:5: 
3429.     AVCodec *codec= NULL;
3430. 
3431.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
          ^
3432.     if (!st) {
3433.         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:3432:10: Taking true branch
3430. 
3431.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3432.     if (!st) {
               ^
3433.         fprintf(stderr, "Could not alloc stream\n");
3434.         ffmpeg_exit(1);

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

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

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

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

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

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

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

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

ffmpeg.c:3122:5: 
  3120. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
  3121. {
  3122.     const char *codec_string = encoder ? "encoder" : "decoder";
            ^
  3123.     AVCodec *codec;
  3124. 

ffmpeg.c:3125:9: Taking false branch
  3123.     AVCodec *codec;
  3124. 
  3125.     if(!name)
                ^
  3126.         return CODEC_ID_NONE;
  3127.     codec = encoder ?

ffmpeg.c:3127:13: Condition is true
  3125.     if(!name)
  3126.         return CODEC_ID_NONE;
  3127.     codec = encoder ?
                    ^
  3128.         avcodec_find_encoder_by_name(name) :
  3129.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3127:5: 
  3125.     if(!name)
  3126.         return CODEC_ID_NONE;
  3127.     codec = encoder ?
            ^
  3128.         avcodec_find_encoder_by_name(name) :
  3129.         avcodec_find_decoder_by_name(name);

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

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

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

ffmpeg.c:3151:5: 
  3149.         ffmpeg_exit(1);
  3150.     }
  3151.     return codec->id;
            ^
  3152. }
  3153. 

ffmpeg.c:3152:1: return from a call to find_codec_or_die
  3150.     }
  3151.     return codec->id;
  3152. }
        ^
  3153. 
  3154. static int opt_input_file(const char *opt, const char *filename)

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

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

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

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

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

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

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