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

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

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

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

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

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

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

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

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

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

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