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

avconv.c:2810:1: start of procedure find_codec_or_die()
2808. }
2809. 
2810. static enum CodecID find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
      ^
2811. {
2812.     const char *codec_string = encoder ? "encoder" : "decoder";

avconv.c:2812:32: Condition is true
2810. static enum CodecID find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
2811. {
2812.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2813.     AVCodec *codec;
2814. 

avconv.c:2812:5: 
2810. static enum CodecID find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
2811. {
2812.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2813.     AVCodec *codec;
2814. 

avconv.c:2815:9: Taking false branch
2813.     AVCodec *codec;
2814. 
2815.     if(!name)
              ^
2816.         return CODEC_ID_NONE;
2817.     codec = encoder ?

avconv.c:2817:13: Condition is true
2815.     if(!name)
2816.         return CODEC_ID_NONE;
2817.     codec = encoder ?
                  ^
2818.         avcodec_find_encoder_by_name(name) :
2819.         avcodec_find_decoder_by_name(name);

avconv.c:2817:5: 
2815.     if(!name)
2816.         return CODEC_ID_NONE;
2817.     codec = encoder ?
          ^
2818.         avcodec_find_encoder_by_name(name) :
2819.         avcodec_find_decoder_by_name(name);

avconv.c:2820:9: Taking true branch
2818.         avcodec_find_encoder_by_name(name) :
2819.         avcodec_find_decoder_by_name(name);
2820.     if(!codec) {
              ^
2821.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2822.         exit_program(1);

avconv.c:2821:9: Skipping av_log(): empty list of specs
2819.         avcodec_find_decoder_by_name(name);
2820.     if(!codec) {
2821.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
              ^
2822.         exit_program(1);
2823.     }

avconv.c:2822:9: Skipping exit_program(): empty list of specs
2820.     if(!codec) {
2821.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2822.         exit_program(1);
              ^
2823.     }
2824.     if(codec->type != type) {

avconv.c:2824:8: 
2822.         exit_program(1);
2823.     }
2824.     if(codec->type != type) {
             ^
2825.         av_log(NULL, AV_LOG_ERROR, "Invalid %s type '%s'\n", codec_string, name);
2826.         exit_program(1);

static enum CodecID find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
{
    const char *codec_string = encoder ? "encoder" : "decoder";
    AVCodec *codec;
    if(!name)
        return CODEC_ID_NONE;
    codec = encoder ?
        avcodec_find_encoder_by_name(name) :
        avcodec_find_decoder_by_name(name);
    if(!codec) {
        av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
        exit_program(1);
    }
    if(codec->type != type) {
        av_log(NULL, AV_LOG_ERROR, "Invalid %s type '%s'\n", codec_string, name);
        exit_program(1);
    }
    return codec->id;
}
['static enum CodecID 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    if(!name)\n        return CODEC_ID_NONE;\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_ERROR, "Unknown %s \'%s\'\\n", codec_string, name);\n        exit_program(1);\n    }\n    if(codec->type != type) {\n        av_log(NULL, AV_LOG_ERROR, "Invalid %s type \'%s\'\\n", codec_string, name);\n        exit_program(1);\n    }\n    return codec->id;\n}']