[144683] trunk/dports/audio/chromaprint
jeremyhu at macports.org
jeremyhu at macports.org
Fri Jan 15 01:40:48 PST 2016
Revision: 144683
https://trac.macports.org/changeset/144683
Author: jeremyhu at macports.org
Date: 2016-01-15 01:40:47 -0800 (Fri, 15 Jan 2016)
Log Message:
-----------
chromaprint: Address build failure with newer ffmpeg
Modified Paths:
--------------
trunk/dports/audio/chromaprint/Portfile
Added Paths:
-----------
trunk/dports/audio/chromaprint/files/newer-ffmpeg.patch
Modified: trunk/dports/audio/chromaprint/Portfile
===================================================================
--- trunk/dports/audio/chromaprint/Portfile 2016-01-15 09:26:19 UTC (rev 144682)
+++ trunk/dports/audio/chromaprint/Portfile 2016-01-15 09:40:47 UTC (rev 144683)
@@ -26,7 +26,7 @@
depends_lib path:lib/libavcodec.dylib:ffmpeg
-patchfiles patch-CMakeLists.txt.diff
+patchfiles patch-CMakeLists.txt.diff newer-ffmpeg.patch
cmake.out_of_source yes
Added: trunk/dports/audio/chromaprint/files/newer-ffmpeg.patch
===================================================================
--- trunk/dports/audio/chromaprint/files/newer-ffmpeg.patch (rev 0)
+++ trunk/dports/audio/chromaprint/files/newer-ffmpeg.patch 2016-01-15 09:40:47 UTC (rev 144683)
@@ -0,0 +1,48 @@
+commit 37092d380a28abcc63fa120499030a0f2b7df80f
+Author: Rodger Combs <rodger.combs at gmail.com>
+Date: Fri Oct 2 14:48:01 2015 -0500
+
+ fpcalc: remove uses of deprecated lavc APIs
+
+Index: chromaprint-1.2/examples/fpcalc.c
+===================================================================
+--- examples/fpcalc.c
++++ 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]);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160115/5acb6da7/attachment.html>
More information about the macports-changes
mailing list