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

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

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

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

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

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

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

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

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

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

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