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

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

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

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

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

ffmpeg.c:2810:13: Condition is true
2808.     if(!name)
2809.         return CODEC_ID_NONE;
2810.     codec = encoder ?
                  ^
2811.         avcodec_find_encoder_by_name(name) :
2812.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2810:5: 
2808.     if(!name)
2809.         return CODEC_ID_NONE;
2810.     codec = encoder ?
          ^
2811.         avcodec_find_encoder_by_name(name) :
2812.         avcodec_find_decoder_by_name(name);

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

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

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

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