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

ffmpeg.c:2746:1: start of procedure find_codec_or_die()
2744. }
2745. 
2746. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2747. {
2748.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2748:32: Condition is false
2746. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2747. {
2748.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2749.     AVCodec *codec;
2750. 

ffmpeg.c:2748:5: 
2746. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2747. {
2748.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2749.     AVCodec *codec;
2750. 

ffmpeg.c:2751:9: Taking false branch
2749.     AVCodec *codec;
2750. 
2751.     if(!name)
              ^
2752.         return CODEC_ID_NONE;
2753.     codec = encoder ?

ffmpeg.c:2753:13: Condition is false
2751.     if(!name)
2752.         return CODEC_ID_NONE;
2753.     codec = encoder ?
                  ^
2754.         avcodec_find_encoder_by_name(name) :
2755.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2753:5: 
2751.     if(!name)
2752.         return CODEC_ID_NONE;
2753.     codec = encoder ?
          ^
2754.         avcodec_find_encoder_by_name(name) :
2755.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2756:9: Taking true branch
2754.         avcodec_find_encoder_by_name(name) :
2755.         avcodec_find_decoder_by_name(name);
2756.     if(!codec) {
              ^
2757.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2758.         av_exit(1);

ffmpeg.c:2757:9: Skipping av_log(): empty list of specs
2755.         avcodec_find_decoder_by_name(name);
2756.     if(!codec) {
2757.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
              ^
2758.         av_exit(1);
2759.     }

ffmpeg.c:2758:9: Skipping av_exit(): empty list of specs
2756.     if(!codec) {
2757.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2758.         av_exit(1);
              ^
2759.     }
2760.     if(codec->type != type) {

ffmpeg.c:2760:8: 
2758.         av_exit(1);
2759.     }
2760.     if(codec->type != type) {
             ^
2761.         av_log(NULL, AV_LOG_ERROR, "Invalid %s type '%s'\n", codec_string, name);
2762.         av_exit(1);
