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

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

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

ffmpeg.c:3074:5: 
3072. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3073. {
3074.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3075.     AVCodec *codec;
3076. 

ffmpeg.c:3077:9: Taking false branch
3075.     AVCodec *codec;
3076. 
3077.     if(!name)
              ^
3078.         return CODEC_ID_NONE;
3079.     codec = encoder ?

ffmpeg.c:3079:13: Condition is true
3077.     if(!name)
3078.         return CODEC_ID_NONE;
3079.     codec = encoder ?
                  ^
3080.         avcodec_find_encoder_by_name(name) :
3081.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3079:5: 
3077.     if(!name)
3078.         return CODEC_ID_NONE;
3079.     codec = encoder ?
          ^
3080.         avcodec_find_encoder_by_name(name) :
3081.         avcodec_find_decoder_by_name(name);

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

ffmpeg.c:3083:9: 
3081.         avcodec_find_decoder_by_name(name);
3082.     if(!codec) {
3083.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3084.         ffmpeg_exit(1);
3085.     }

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

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