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

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

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

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

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

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

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

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

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

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

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