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

ffmpeg.c:3064:1: start of procedure find_codec_or_die()
3062. }
3063. 
3064. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
3065. {
3066.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3066:32: Condition is true
3064. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3065. {
3066.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3067.     AVCodec *codec;
3068. 

ffmpeg.c:3066:5: 
3064. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3065. {
3066.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3067.     AVCodec *codec;
3068. 

ffmpeg.c:3069:9: Taking false branch
3067.     AVCodec *codec;
3068. 
3069.     if(!name)
              ^
3070.         return CODEC_ID_NONE;
3071.     codec = encoder ?

ffmpeg.c:3071:13: Condition is true
3069.     if(!name)
3070.         return CODEC_ID_NONE;
3071.     codec = encoder ?
                  ^
3072.         avcodec_find_encoder_by_name(name) :
3073.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3071:5: 
3069.     if(!name)
3070.         return CODEC_ID_NONE;
3071.     codec = encoder ?
          ^
3072.         avcodec_find_encoder_by_name(name) :
3073.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3074:9: Taking true branch
3072.         avcodec_find_encoder_by_name(name) :
3073.         avcodec_find_decoder_by_name(name);
3074.     if(!codec) {
              ^
3075.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3076.         ffmpeg_exit(1);

ffmpeg.c:3075:9: 
3073.         avcodec_find_decoder_by_name(name);
3074.     if(!codec) {
3075.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3076.         ffmpeg_exit(1);
3077.     }

ffmpeg.c:3076:9: Skipping ffmpeg_exit(): empty list of specs
3074.     if(!codec) {
3075.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3076.         ffmpeg_exit(1);
              ^
3077.     }
3078.     if(codec->type != type) {

ffmpeg.c:3078:8: 
3076.         ffmpeg_exit(1);
3077.     }
3078.     if(codec->type != type) {
             ^
3079.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
3080.         ffmpeg_exit(1);
