avconv.c:3084: error: Null Dereference
  pointer `codec` last assigned on line 3077 could be null and is dereferenced at line 3084, column 9.

avconv.c:3072:1: start of procedure find_codec_or_die()
3070. }
3071. 
3072. static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
      ^
3073. {
3074.     const char *codec_string = encoder ? "encoder" : "decoder";

avconv.c:3074:32: Condition is true
3072. static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
3073. {
3074.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3075.     AVCodec *codec;
3076. 

avconv.c:3074:5: 
3072. static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
3073. {
3074.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3075.     AVCodec *codec;
3076. 

avconv.c:3077:13: Condition is true
3075.     AVCodec *codec;
3076. 
3077.     codec = encoder ?
                  ^
3078.         avcodec_find_encoder_by_name(name) :
3079.         avcodec_find_decoder_by_name(name);

avconv.c:3077:5: 
3075.     AVCodec *codec;
3076. 
3077.     codec = encoder ?
          ^
3078.         avcodec_find_encoder_by_name(name) :
3079.         avcodec_find_decoder_by_name(name);

avconv.c:3080:10: Taking true branch
3078.         avcodec_find_encoder_by_name(name) :
3079.         avcodec_find_decoder_by_name(name);
3080.     if (!codec) {
               ^
3081.         av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name);
3082.         exit_program(1);

avconv.c:3081:9: Skipping av_log(): empty list of specs
3079.         avcodec_find_decoder_by_name(name);
3080.     if (!codec) {
3081.         av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name);
              ^
3082.         exit_program(1);
3083.     }

avconv.c:3082:9: Skipping exit_program(): empty list of specs
3080.     if (!codec) {
3081.         av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name);
3082.         exit_program(1);
              ^
3083.     }
3084.     if (codec->type != type) {

avconv.c:3084:9: 
3082.         exit_program(1);
3083.     }
3084.     if (codec->type != type) {
              ^
3085.         av_log(NULL, AV_LOG_FATAL, "Invalid %s type '%s'\n", codec_string, name);
3086.         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}']