[vlc-devel] [PATCH] contrib/sidplay2: fix ambiguity with overloaded log() function call

Sean McGovern gseanmcg at gmail.com
Wed Sep 9 00:19:13 CEST 2015


---
 contrib/src/sidplay2/rules.mak                    |    1 +
 contrib/src/sidplay2/sidplay2-fix-ambiguity.patch |   11 +++++++++++
 2 files changed, 12 insertions(+)
 create mode 100644 contrib/src/sidplay2/sidplay2-fix-ambiguity.patch

diff --git a/contrib/src/sidplay2/rules.mak b/contrib/src/sidplay2/rules.mak
index b1d814c..957ea5a 100644
--- a/contrib/src/sidplay2/rules.mak
+++ b/contrib/src/sidplay2/rules.mak
@@ -19,6 +19,7 @@ sidplay-libs: sidplay-libs-$(SID_VERSION).tar.gz .sum-sidplay2
 	$(APPLY) $(SRC)/sidplay2/sidplay2-smartprt.patch
 	$(APPLY) $(SRC)/sidplay2/sidplay2-noutils.patch
 	$(APPLY) $(SRC)/sidplay2/sidplay2-string.patch
+	$(APPLY) $(SRC)/sidplay2/sidplay2-fix-ambiguity.patch
 	$(MOVE)
 
 .sidplay2: sidplay-libs
diff --git a/contrib/src/sidplay2/sidplay2-fix-ambiguity.patch b/contrib/src/sidplay2/sidplay2-fix-ambiguity.patch
new file mode 100644
index 0000000..564607f
--- /dev/null
+++ b/contrib/src/sidplay2/sidplay2-fix-ambiguity.patch
@@ -0,0 +1,11 @@
+--- sidplay-libs/resid/sid.cc.ORIG	Mon Jun 14 16:08:23 2004
++++ sidplay-libs/resid/sid.cc	Tue Sep  8 18:13:42 2015
+@@ -552,7 +552,7 @@
+   // sample_offset a whole multiple of the filter table resolution.
+   int res = method == SAMPLE_RESAMPLE_INTERPOLATE ?
+     FIR_RES_INTERPOLATE : FIR_RES_FAST;
+-  int n = (int)ceil(log(res/f_cycles_per_sample)/log(2));
++  int n = (int)ceil(log(res/f_cycles_per_sample)/log(2.0));
+   fir_RES = 1 << n;
+ 
+   // Allocate memory for FIR tables.
-- 
1.7.9.2



More information about the vlc-devel mailing list