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

ffmpeg.c:3007:1: start of procedure find_codec_or_die()
3005. }
3006. 
3007. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
3008. {
3009.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3009:32: Condition is true
3007. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3008. {
3009.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3010.     AVCodec *codec;
3011. 

ffmpeg.c:3009:5: 
3007. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3008. {
3009.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3010.     AVCodec *codec;
3011. 

ffmpeg.c:3012:9: Taking false branch
3010.     AVCodec *codec;
3011. 
3012.     if(!name)
              ^
3013.         return CODEC_ID_NONE;
3014.     codec = encoder ?

ffmpeg.c:3014:13: Condition is true
3012.     if(!name)
3013.         return CODEC_ID_NONE;
3014.     codec = encoder ?
                  ^
3015.         avcodec_find_encoder_by_name(name) :
3016.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3014:5: 
3012.     if(!name)
3013.         return CODEC_ID_NONE;
3014.     codec = encoder ?
          ^
3015.         avcodec_find_encoder_by_name(name) :
3016.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3017:9: Taking true branch
3015.         avcodec_find_encoder_by_name(name) :
3016.         avcodec_find_decoder_by_name(name);
3017.     if(!codec) {
              ^
3018.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3019.         ffmpeg_exit(1);

ffmpeg.c:3018:9: 
3016.         avcodec_find_decoder_by_name(name);
3017.     if(!codec) {
3018.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3019.         ffmpeg_exit(1);
3020.     }

ffmpeg.c:3019:9: Skipping ffmpeg_exit(): empty list of specs
3017.     if(!codec) {
3018.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3019.         ffmpeg_exit(1);
              ^
3020.     }
3021.     if(codec->type != type) {

ffmpeg.c:3021:8: 
3019.         ffmpeg_exit(1);
3020.     }
3021.     if(codec->type != type) {
             ^
3022.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
3023.         ffmpeg_exit(1);
