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

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

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

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

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

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

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

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

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

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

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