Description: Allow chromaprint to build with new libav with API v9 This patch changes from the old API (in use since FFMPEG was the favored lib to compile against), to the new API provided by the libav* family of libraries. Also takes care to import the right C symbols from libavutil/mem.h to fix linking. . chromaprint (0.7-1~matteo1) UNRELEASED; urgency=low . * Non-maintainer upload. * Update to latest upstream + Use libav API v9 Author: Matteo Settenvini Bug-Debian: http://bugs.debian.org/692912 Forwarded: no Last-Update: 2012-12-19 --- chromaprint-0.7.orig/examples/fpcalc.c +++ chromaprint-0.7/examples/fpcalc.c @@ -42,7 +42,7 @@ int decode_audio_file(ChromaprintContext goto done; } - if (av_find_stream_info(format_ctx) < 0) { + if (avformat_find_stream_info(format_ctx, NULL) < 0) { fprintf(stderr, "ERROR: couldn't find stream information in the file\n"); goto done; } @@ -65,7 +65,7 @@ int decode_audio_file(ChromaprintContext goto done; } - if (avcodec_open(codec_ctx, codec) < 0) { + if (avcodec_open2(codec_ctx, codec, NULL) < 0) { fprintf(stderr, "ERROR: couldn't open the codec\n"); goto done; } --- chromaprint-0.7.orig/src/fft_lib_avfft.cpp +++ chromaprint-0.7/src/fft_lib_avfft.cpp @@ -21,6 +21,11 @@ #include "utils.h" #include "fft_lib_avfft.h" +extern "C" +{ + #include +} + using namespace std; using namespace Chromaprint;