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

avconv.c:2728:1: start of procedure find_codec_or_die()
2726. }
2727. 
2728. static enum CodecID find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
      ^
2729. {
2730.     const char *codec_string = encoder ? "encoder" : "decoder";

avconv.c:2730:32: Condition is true
2728. static enum CodecID find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
2729. {
2730.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2731.     AVCodec *codec;
2732. 

avconv.c:2730:5: 
2728. static enum CodecID find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
2729. {
2730.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2731.     AVCodec *codec;
2732. 

avconv.c:2733:9: Taking false branch
2731.     AVCodec *codec;
2732. 
2733.     if(!name)
              ^
2734.         return CODEC_ID_NONE;
2735.     codec = encoder ?

avconv.c:2735:13: Condition is true
2733.     if(!name)
2734.         return CODEC_ID_NONE;
2735.     codec = encoder ?
                  ^
2736.         avcodec_find_encoder_by_name(name) :
2737.         avcodec_find_decoder_by_name(name);

avconv.c:2735:5: 
2733.     if(!name)
2734.         return CODEC_ID_NONE;
2735.     codec = encoder ?
          ^
2736.         avcodec_find_encoder_by_name(name) :
2737.         avcodec_find_decoder_by_name(name);

avconv.c:2738:9: Taking true branch
2736.         avcodec_find_encoder_by_name(name) :
2737.         avcodec_find_decoder_by_name(name);
2738.     if(!codec) {
              ^
2739.         av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name);
2740.         exit_program(1);

avconv.c:2739:9: Skipping av_log(): empty list of specs
2737.         avcodec_find_decoder_by_name(name);
2738.     if(!codec) {
2739.         av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name);
              ^
2740.         exit_program(1);
2741.     }

avconv.c:2740:9: Skipping exit_program(): empty list of specs
2738.     if(!codec) {
2739.         av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name);
2740.         exit_program(1);
              ^
2741.     }
2742.     if(codec->type != type) {

avconv.c:2742:8: 
2740.         exit_program(1);
2741.     }
2742.     if(codec->type != type) {
             ^
2743.         av_log(NULL, AV_LOG_FATAL, "Invalid %s type '%s'\n", codec_string, name);
2744.         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_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->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_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->id;\n}']