https://bugs.gentoo.org/show_bug.cgi?id=435856 https://raw.github.com/pld-linux/chromaprint/master/chromaprint-ffmpeg.patch --- chromaprint-0.7/src/ext/ffmpeg_decoder.h.orig 2012-09-05 20:05:36.000000000 +0200 +++ chromaprint-0.7/src/ext/ffmpeg_decoder.h 2012-10-10 17:59:58.632685943 +0200 @@ -53,7 +53,7 @@ } private: - static const int BUFFER_SIZE = AVCODEC_MAX_AUDIO_FRAME_SIZE * 2; + static const int BUFFER_SIZE = 192000 * 2; uint8_t *m_buffer1; uint8_t *m_buffer2; std::string m_file_name; @@ -80,7 +80,7 @@ avcodec_close(m_codec_ctx); } if (m_format_ctx) { - av_close_input_file(m_format_ctx); + avformat_close_input(&m_format_ctx); } //av_audio_convert_free(m_convert_ctx); av_free(m_buffer2); @@ -89,12 +89,12 @@ inline bool Decoder::Open() { - if (av_open_input_file(&m_format_ctx, m_file_name.c_str(), NULL, 0, NULL) != 0) { + if (avformat_open_input(&m_format_ctx, m_file_name.c_str(), NULL, NULL) != 0) { m_error = "Couldn't open the file." + m_file_name; return false; } - if (av_find_stream_info(m_format_ctx) < 0) { + if (avformat_find_stream_info(m_format_ctx, NULL) < 0) { m_error = "Couldn't find stream information in the file."; return false; } @@ -129,11 +129,11 @@ return false; } - if (m_codec_ctx->sample_fmt != SAMPLE_FMT_S16) { + if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16) { m_error = "Unsupported sample format.\n"; return false; } - /*m_convert_ctx = av_audio_convert_alloc(SAMPLE_FMT_S16, 1, + /*m_convert_ctx = av_audio_convert_alloc(AV_SAMPLE_FMT_S16, 1, m_codec_ctx->sample_fmt, 1, NULL, 0); if (!m_convert_ctx) { --- chromaprint-0.7/examples/fpcalc.c.orig 2013-06-10 02:20:58.497275579 +0200 +++ chromaprint-0.7/examples/fpcalc.c 2013-06-10 02:21:11.386114447 +0200 @@ -13,7 +13,7 @@ #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define BUFFER_SIZE (AVCODEC_MAX_AUDIO_FRAME_SIZE * 2) +#define BUFFER_SIZE (192000 * 2) #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52, 94, 1) #define AV_SAMPLE_FMT_S16 SAMPLE_FMT_S16