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

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

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

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

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

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

libavformat/utils.c:2635:1: start of procedure av_new_stream()
  2633. }
  2634. 
  2635. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2636. {
  2637.     AVStream *st;

libavformat/utils.c:2641:9: Taking true branch
  2639.     AVStream **streams;
  2640. 
  2641.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
                ^
  2642.         return NULL;
  2643.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));

libavformat/utils.c:2642:9: 
  2640. 
  2641.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
  2642.         return NULL;
                ^
  2643.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));
  2644.     if (!streams)

libavformat/utils.c:2684:1: return from a call to av_new_stream
  2682.     s->streams[s->nb_streams++] = st;
  2683.     return st;
  2684. }
        ^
  2685. 
  2686. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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