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

ffmpeg.c:2788:1: start of procedure find_codec_or_die()
2786. }
2787. 
2788. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2789. {
2790.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2790:32: Condition is true
2788. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2789. {
2790.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2791.     AVCodec *codec;
2792. 

ffmpeg.c:2790:5: 
2788. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2789. {
2790.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2791.     AVCodec *codec;
2792. 

ffmpeg.c:2793:9: Taking false branch
2791.     AVCodec *codec;
2792. 
2793.     if(!name)
              ^
2794.         return CODEC_ID_NONE;
2795.     codec = encoder ?

ffmpeg.c:2795:13: Condition is true
2793.     if(!name)
2794.         return CODEC_ID_NONE;
2795.     codec = encoder ?
                  ^
2796.         avcodec_find_encoder_by_name(name) :
2797.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2795:5: 
2793.     if(!name)
2794.         return CODEC_ID_NONE;
2795.     codec = encoder ?
          ^
2796.         avcodec_find_encoder_by_name(name) :
2797.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2798:9: Taking true branch
2796.         avcodec_find_encoder_by_name(name) :
2797.         avcodec_find_decoder_by_name(name);
2798.     if(!codec) {
              ^
2799.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2800.         av_exit(1);

ffmpeg.c:2799:9: 
2797.         avcodec_find_decoder_by_name(name);
2798.     if(!codec) {
2799.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2800.         av_exit(1);
2801.     }

ffmpeg.c:2800:9: Skipping av_exit(): empty list of specs
2798.     if(!codec) {
2799.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2800.         av_exit(1);
              ^
2801.     }
2802.     if(codec->type != type) {

ffmpeg.c:2802:8: 
2800.         av_exit(1);
2801.     }
2802.     if(codec->type != type) {
             ^
2803.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2804.         av_exit(1);
