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

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

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

ffmpeg.c:3070:5: 
3068. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3069. {
3070.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3071.     AVCodec *codec;
3072. 

ffmpeg.c:3073:9: Taking false branch
3071.     AVCodec *codec;
3072. 
3073.     if(!name)
              ^
3074.         return CODEC_ID_NONE;
3075.     codec = encoder ?

ffmpeg.c:3075:13: Condition is true
3073.     if(!name)
3074.         return CODEC_ID_NONE;
3075.     codec = encoder ?
                  ^
3076.         avcodec_find_encoder_by_name(name) :
3077.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3075:5: 
3073.     if(!name)
3074.         return CODEC_ID_NONE;
3075.     codec = encoder ?
          ^
3076.         avcodec_find_encoder_by_name(name) :
3077.         avcodec_find_decoder_by_name(name);

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

ffmpeg.c:3079:9: 
3077.         avcodec_find_decoder_by_name(name);
3078.     if(!codec) {
3079.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3080.         ffmpeg_exit(1);
3081.     }

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

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