ffmpeg.c:2731: error: Null Dereference
  pointer `codec` last assigned on line 2724 could be null and is dereferenced at line 2731, column 8.

ffmpeg.c:2717:1: start of procedure find_codec_or_die()
2715. }
2716. 
2717. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2718. {
2719.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2719:32: Condition is true
2717. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2718. {
2719.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2720.     AVCodec *codec;
2721. 

ffmpeg.c:2719:5: 
2717. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2718. {
2719.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2720.     AVCodec *codec;
2721. 

ffmpeg.c:2722:9: Taking false branch
2720.     AVCodec *codec;
2721. 
2722.     if(!name)
              ^
2723.         return CODEC_ID_NONE;
2724.     codec = encoder ?

ffmpeg.c:2724:13: Condition is true
2722.     if(!name)
2723.         return CODEC_ID_NONE;
2724.     codec = encoder ?
                  ^
2725.         avcodec_find_encoder_by_name(name) :
2726.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2724:5: 
2722.     if(!name)
2723.         return CODEC_ID_NONE;
2724.     codec = encoder ?
          ^
2725.         avcodec_find_encoder_by_name(name) :
2726.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2727:9: Taking true branch
2725.         avcodec_find_encoder_by_name(name) :
2726.         avcodec_find_decoder_by_name(name);
2727.     if(!codec) {
              ^
2728.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2729.         av_exit(1);

ffmpeg.c:2728:9: Skipping av_log(): empty list of specs
2726.         avcodec_find_decoder_by_name(name);
2727.     if(!codec) {
2728.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
              ^
2729.         av_exit(1);
2730.     }

ffmpeg.c:2729:9: Skipping av_exit(): empty list of specs
2727.     if(!codec) {
2728.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2729.         av_exit(1);
              ^
2730.     }
2731.     if(codec->type != type) {

ffmpeg.c:2731:8: 
2729.         av_exit(1);
2730.     }
2731.     if(codec->type != type) {
             ^
2732.         av_log(NULL, AV_LOG_ERROR, "Invalid %s type '%s'\n", codec_string, name);
2733.         av_exit(1);
