summaryrefslogtreecommitdiff
path: root/extra/chromaprint/ffmpeg.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/chromaprint/ffmpeg.patch')
-rw-r--r--extra/chromaprint/ffmpeg.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/extra/chromaprint/ffmpeg.patch b/extra/chromaprint/ffmpeg.patch
new file mode 100644
index 000000000..4c41ca664
--- /dev/null
+++ b/extra/chromaprint/ffmpeg.patch
@@ -0,0 +1,21 @@
+diff -Naur old/examples/fpcalc.c new/examples/fpcalc.c
+--- old/examples/fpcalc.c 2012-09-06 04:05:36.000000000 +1000
++++ new/examples/fpcalc.c 2013-03-07 00:43:11.950928188 +1100
+@@ -65,6 +65,9 @@
+ goto done;
+ }
+
++ /* request regular signed 16-bit packed format */
++ codec_ctx->request_sample_fmt = AV_SAMPLE_FMT_S16;
++
+ if (avcodec_open(codec_ctx, codec) < 0) {
+ fprintf(stderr, "ERROR: couldn't open the codec\n");
+ goto done;
+@@ -146,6 +149,7 @@
+ int ostride[6] = { 2 };
+ int len = buffer_size / istride[0];
+ if (av_audio_convert(convert_ctx, obuf, ostride, ibuf, istride, len) < 0) {
++ fprintf(stderr, "WARNING: unable to convert %d samples\n", buffer_size);
+ break;
+ }
+ buffer = buffer2;