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

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

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

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

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

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

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

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

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

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

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