summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2014-02-10 16:47:48 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2014-02-10 16:47:48 +0000
commita658407ca0e1f6cce5e7c4f3a5e06f4414b80abc (patch)
tree1b6e3854d4abef83c6cf9894d6ebd09ea37fdd90 /media-libs/chromaprint/files
parentadding optional oracle support (diff)
downloadgentoo-2-a658407ca0e1f6cce5e7c4f3a5e06f4414b80abc.tar.gz
gentoo-2-a658407ca0e1f6cce5e7c4f3a5e06f4414b80abc.tar.bz2
gentoo-2-a658407ca0e1f6cce5e7c4f3a5e06f4414b80abc.zip
Apply upstream patch from bug 498194 to fix build with certain versions of media-video/libav wrt #498194 by Laurent Bachelier
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
Diffstat (limited to 'media-libs/chromaprint/files')
-rw-r--r--media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch b/media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch
new file mode 100644
index 000000000000..b53f79838091
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch
@@ -0,0 +1,59 @@
+http://bugs.gentoo.org/498194
+http://bitbucket.org/acoustid/chromaprint/commits/90822f6eee64da2941c9cbd9cd41a9664fead1d4
+
+From 90822f6eee64da2941c9cbd9cd41a9664fead1d4 Mon Sep 17 00:00:00 2001
+From: Urs Fleisch <ufleisch@users.sourceforge.net>
+Date: Sat, 28 Dec 2013 09:47:31 +0100
+Subject: [PATCH] Build fpcalc if neither HAVE_SWRESAMPLE nor HAVE_AVRESAMPLE
+ defined, issue #11.
+
+---
+ examples/fpcalc.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/examples/fpcalc.c b/examples/fpcalc.c
+index a4b0ff9..e73e358 100644
+--- a/examples/fpcalc.c
++++ b/examples/fpcalc.c
+@@ -33,6 +33,8 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ SwrContext *convert_ctx = NULL;
+ #elif defined(HAVE_AVRESAMPLE)
+ AVAudioResampleContext *convert_ctx = NULL;
++#else
++ void *convert_ctx = NULL;
+ #endif
+ int max_dst_nb_samples = 0, dst_linsize = 0;
+ uint8_t *dst_data[1] = { NULL };
+@@ -75,6 +77,7 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ goto done;
+ }
+
++#if defined(HAVE_SWRESAMPLE) || defined(HAVE_AVRESAMPLE)
+ if (codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16) {
+ int64_t channel_layout = codec_ctx->channel_layout;
+ if (!channel_layout) {
+@@ -111,6 +114,7 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ }
+ #endif
+ }
++#endif
+
+ if (stream->duration != AV_NOPTS_VALUE) {
+ *duration = stream->time_base.num * stream->duration / stream->time_base.den;
+@@ -155,10 +159,11 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ max_dst_nb_samples = frame->nb_samples;
+ }
+ #if defined(HAVE_SWRESAMPLE)
+- if (swr_convert(convert_ctx, dst_data, frame->nb_samples, (const uint8_t **)frame->data, frame->nb_samples) < 0) {
++ if (swr_convert(convert_ctx, dst_data, frame->nb_samples, (const uint8_t **)frame->data, frame->nb_samples) < 0)
+ #elif defined(HAVE_AVRESAMPLE)
+- if (avresample_convert(convert_ctx, dst_data, 0, frame->nb_samples, (uint8_t **)frame->data, 0, frame->nb_samples) < 0) {
++ if (avresample_convert(convert_ctx, dst_data, 0, frame->nb_samples, (uint8_t **)frame->data, 0, frame->nb_samples) < 0)
+ #endif
++ {
+ fprintf(stderr, "ERROR: couldn't convert the audio\n");
+ goto done;
+ }
+--
+1.9.rc2.211.gd198f5d
+