Package: chromaprint Version: 1.2-1 Severity: important Tags: patch User: pkg-multimedia-maintainers@lists.alioth.debian.org Usertags: ffmpeg2.9
Dear Maintainer, your package fails to build with the upcoming ffmpeg 2.9. This bug will become release-critical at some point when the ffmpeg2.9 transition gets closer. Attached is a patch replacing the deprecated functionality. It also works with ffmpeg 2.8. Please apply this patch and forward it upstream, if necessary. These changes have little regression potential. Best regards, Andreas
diff --git a/debian/patches/ffmpeg_2.9.patch b/debian/patches/ffmpeg_2.9.patch new file mode 100644 index 0000000..f5fd17e --- /dev/null +++ b/debian/patches/ffmpeg_2.9.patch @@ -0,0 +1,44 @@ +Description: Replace deprecated FFmpeg API +Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> +Last-Update: <2015-11-02> + +--- chromaprint-1.2.orig/examples/fpcalc.c ++++ chromaprint-1.2/examples/fpcalc.c +@@ -17,10 +17,6 @@ + #define MAX(a, b) ((a) > (b) ? (a) : (b)) + #define MIN(a, b) ((a) < (b) ? (a) : (b)) + +-#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 28, 0) +-#define avcodec_free_frame av_freep +-#endif +- + int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name, int max_length, int *duration) + { + int ok = 0, remaining, length, consumed, codec_ctx_opened = 0, got_frame, stream_index; +@@ -131,7 +127,7 @@ int decode_audio_file(ChromaprintContext + remaining = max_length * codec_ctx->channels * codec_ctx->sample_rate; + chromaprint_start(chromaprint_ctx, codec_ctx->sample_rate, codec_ctx->channels); + +- frame = avcodec_alloc_frame(); ++ frame = av_frame_alloc(); + + while (1) { + if (av_read_frame(format_ctx, &packet) < 0) { +@@ -139,7 +135,7 @@ int decode_audio_file(ChromaprintContext + } + + if (packet.stream_index == stream_index) { +- avcodec_get_frame_defaults(frame); ++ av_frame_unref(frame); + + got_frame = 0; + consumed = avcodec_decode_audio4(codec_ctx, frame, &got_frame, &packet); +@@ -196,7 +192,7 @@ finish: + + done: + if (frame) { +- avcodec_free_frame(&frame); ++ av_frame_free(&frame); + } + if (dst_data[0]) { + av_freep(&dst_data[0]); diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..f762d21 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +ffmpeg_2.9.patch
_______________________________________________ pkg-multimedia-maintainers mailing list pkg-multimedia-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers