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

ffmpeg.c:2800:1: start of procedure find_codec_or_die()
2798. }
2799. 
2800. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2801. {
2802.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2802:32: Condition is false
2800. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2801. {
2802.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2803.     AVCodec *codec;
2804. 

ffmpeg.c:2802:5: 
2800. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2801. {
2802.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2803.     AVCodec *codec;
2804. 

ffmpeg.c:2805:9: Taking false branch
2803.     AVCodec *codec;
2804. 
2805.     if(!name)
              ^
2806.         return CODEC_ID_NONE;
2807.     codec = encoder ?

ffmpeg.c:2807:13: Condition is false
2805.     if(!name)
2806.         return CODEC_ID_NONE;
2807.     codec = encoder ?
                  ^
2808.         avcodec_find_encoder_by_name(name) :
2809.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2807:5: 
2805.     if(!name)
2806.         return CODEC_ID_NONE;
2807.     codec = encoder ?
          ^
2808.         avcodec_find_encoder_by_name(name) :
2809.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2810:9: Taking true branch
2808.         avcodec_find_encoder_by_name(name) :
2809.         avcodec_find_decoder_by_name(name);
2810.     if(!codec) {
              ^
2811.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2812.         av_exit(1);

ffmpeg.c:2811:9: 
2809.         avcodec_find_decoder_by_name(name);
2810.     if(!codec) {
2811.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2812.         av_exit(1);
2813.     }

ffmpeg.c:2812:9: Skipping av_exit(): empty list of specs
2810.     if(!codec) {
2811.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2812.         av_exit(1);
              ^
2813.     }
2814.     if(codec->type != type) {

ffmpeg.c:2814:8: 
2812.         av_exit(1);
2813.     }
2814.     if(codec->type != type) {
             ^
2815.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2816.         av_exit(1);
