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

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

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

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

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

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

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

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

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

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

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