avconv.c:2816: error: Null Dereference
  pointer `codec` last assigned on line 2809 could be null and is dereferenced at line 2816, column 8.

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

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

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

avconv.c:2809:13: Condition is true
2807.     AVCodec *codec;
2808. 
2809.     codec = encoder ?
                  ^
2810.         avcodec_find_encoder_by_name(name) :
2811.         avcodec_find_decoder_by_name(name);

avconv.c:2809:5: 
2807.     AVCodec *codec;
2808. 
2809.     codec = encoder ?
          ^
2810.         avcodec_find_encoder_by_name(name) :
2811.         avcodec_find_decoder_by_name(name);

avconv.c:2812:9: Taking true branch
2810.         avcodec_find_encoder_by_name(name) :
2811.         avcodec_find_decoder_by_name(name);
2812.     if(!codec) {
              ^
2813.         av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name);
2814.         exit_program(1);

avconv.c:2813:9: Skipping av_log(): empty list of specs
2811.         avcodec_find_decoder_by_name(name);
2812.     if(!codec) {
2813.         av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name);
              ^
2814.         exit_program(1);
2815.     }

avconv.c:2814:9: Skipping exit_program(): empty list of specs
2812.     if(!codec) {
2813.         av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name);
2814.         exit_program(1);
              ^
2815.     }
2816.     if(codec->type != type) {

avconv.c:2816:8: 
2814.         exit_program(1);
2815.     }
2816.     if(codec->type != type) {
             ^
2817.         av_log(NULL, AV_LOG_FATAL, "Invalid %s type '%s'\n", codec_string, name);
2818.         exit_program(1);

static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
{
    const char *codec_string = encoder ? "encoder" : "decoder";
    AVCodec *codec;
    codec = encoder ?
        avcodec_find_encoder_by_name(name) :
        avcodec_find_decoder_by_name(name);
    if(!codec) {
        av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name);
        exit_program(1);
    }
    if(codec->type != type) {
        av_log(NULL, AV_LOG_FATAL, "Invalid %s type '%s'\n", codec_string, name);
        exit_program(1);
    }
    return codec;
}
['static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder)\n{\n    const char *codec_string = encoder ? "encoder" : "decoder";\n    AVCodec *codec;\n    codec = encoder ?\n        avcodec_find_encoder_by_name(name) :\n        avcodec_find_decoder_by_name(name);\n    if(!codec) {\n        av_log(NULL, AV_LOG_FATAL, "Unknown %s \'%s\'\\n", codec_string, name);\n        exit_program(1);\n    }\n    if(codec->type != type) {\n        av_log(NULL, AV_LOG_FATAL, "Invalid %s type \'%s\'\\n", codec_string, name);\n        exit_program(1);\n    }\n    return codec;\n}']