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

ffmpeg.c:2741:1: start of procedure find_codec_or_die()
2739. }
2740. 
2741. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2742. {
2743.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2743:32: Condition is true
2741. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2742. {
2743.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2744.     AVCodec *codec;
2745. 

ffmpeg.c:2743:5: 
2741. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2742. {
2743.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2744.     AVCodec *codec;
2745. 

ffmpeg.c:2746:9: Taking false branch
2744.     AVCodec *codec;
2745. 
2746.     if(!name)
              ^
2747.         return CODEC_ID_NONE;
2748.     codec = encoder ?

ffmpeg.c:2748:13: Condition is true
2746.     if(!name)
2747.         return CODEC_ID_NONE;
2748.     codec = encoder ?
                  ^
2749.         avcodec_find_encoder_by_name(name) :
2750.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2748:5: 
2746.     if(!name)
2747.         return CODEC_ID_NONE;
2748.     codec = encoder ?
          ^
2749.         avcodec_find_encoder_by_name(name) :
2750.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2751:9: Taking true branch
2749.         avcodec_find_encoder_by_name(name) :
2750.         avcodec_find_decoder_by_name(name);
2751.     if(!codec) {
              ^
2752.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2753.         av_exit(1);

ffmpeg.c:2752:9: Skipping av_log(): empty list of specs
2750.         avcodec_find_decoder_by_name(name);
2751.     if(!codec) {
2752.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
              ^
2753.         av_exit(1);
2754.     }

ffmpeg.c:2753:9: Skipping av_exit(): empty list of specs
2751.     if(!codec) {
2752.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2753.         av_exit(1);
              ^
2754.     }
2755.     if(codec->type != type) {

ffmpeg.c:2755:8: 
2753.         av_exit(1);
2754.     }
2755.     if(codec->type != type) {
             ^
2756.         av_log(NULL, AV_LOG_ERROR, "Invalid %s type '%s'\n", codec_string, name);
2757.         av_exit(1);
