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

ffmpeg.c:2757:1: start of procedure find_codec_or_die()
2755. }
2756. 
2757. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2758. {
2759.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2759:32: Condition is true
2757. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2758. {
2759.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2760.     AVCodec *codec;
2761. 

ffmpeg.c:2759:5: 
2757. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2758. {
2759.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2760.     AVCodec *codec;
2761. 

ffmpeg.c:2762:9: Taking false branch
2760.     AVCodec *codec;
2761. 
2762.     if(!name)
              ^
2763.         return CODEC_ID_NONE;
2764.     codec = encoder ?

ffmpeg.c:2764:13: Condition is true
2762.     if(!name)
2763.         return CODEC_ID_NONE;
2764.     codec = encoder ?
                  ^
2765.         avcodec_find_encoder_by_name(name) :
2766.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2764:5: 
2762.     if(!name)
2763.         return CODEC_ID_NONE;
2764.     codec = encoder ?
          ^
2765.         avcodec_find_encoder_by_name(name) :
2766.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2767:9: Taking true branch
2765.         avcodec_find_encoder_by_name(name) :
2766.         avcodec_find_decoder_by_name(name);
2767.     if(!codec) {
              ^
2768.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2769.         av_exit(1);

ffmpeg.c:2768:9: Skipping av_log(): empty list of specs
2766.         avcodec_find_decoder_by_name(name);
2767.     if(!codec) {
2768.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
              ^
2769.         av_exit(1);
2770.     }

ffmpeg.c:2769:9: Skipping av_exit(): empty list of specs
2767.     if(!codec) {
2768.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2769.         av_exit(1);
              ^
2770.     }
2771.     if(codec->type != type) {

ffmpeg.c:2771:8: 
2769.         av_exit(1);
2770.     }
2771.     if(codec->type != type) {
             ^
2772.         av_log(NULL, AV_LOG_ERROR, "Invalid %s type '%s'\n", codec_string, name);
2773.         av_exit(1);
