summaryrefslogtreecommitdiff
path: root/extra/chromaprint/ffmpeg.patch
blob: 4c41ca66408a6c1c5e00490ad52863c621858257 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;