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

ffmpeg.c:2793:1: start of procedure find_codec_or_die()
2791. }
2792. 
2793. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2794. {
2795.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2795:32: Condition is true
2793. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2794. {
2795.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2796.     AVCodec *codec;
2797. 

ffmpeg.c:2795:5: 
2793. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2794. {
2795.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2796.     AVCodec *codec;
2797. 

ffmpeg.c:2798:9: Taking false branch
2796.     AVCodec *codec;
2797. 
2798.     if(!name)
              ^
2799.         return CODEC_ID_NONE;
2800.     codec = encoder ?

ffmpeg.c:2800:13: Condition is true
2798.     if(!name)
2799.         return CODEC_ID_NONE;
2800.     codec = encoder ?
                  ^
2801.         avcodec_find_encoder_by_name(name) :
2802.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2800:5: 
2798.     if(!name)
2799.         return CODEC_ID_NONE;
2800.     codec = encoder ?
          ^
2801.         avcodec_find_encoder_by_name(name) :
2802.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2803:9: Taking true branch
2801.         avcodec_find_encoder_by_name(name) :
2802.         avcodec_find_decoder_by_name(name);
2803.     if(!codec) {
              ^
2804.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2805.         av_exit(1);

ffmpeg.c:2804:9: 
2802.         avcodec_find_decoder_by_name(name);
2803.     if(!codec) {
2804.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2805.         av_exit(1);
2806.     }

ffmpeg.c:2805:9: Skipping av_exit(): empty list of specs
2803.     if(!codec) {
2804.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2805.         av_exit(1);
              ^
2806.     }
2807.     if(codec->type != type) {

ffmpeg.c:2807:8: 
2805.         av_exit(1);
2806.     }
2807.     if(codec->type != type) {
             ^
2808.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2809.         av_exit(1);
