[vlc-commits] contribs: Fix x265 build with recent GCC

Hugo Beauzée-Luyssen git at videolan.org
Wed Dec 7 13:38:44 CET 2016


vlc/vlc-2.2 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Dec  7 11:41:31 2016 +0100| [1ec161336a07103a3291792fb7512b2c5e698ec3] | committer: Hugo Beauzée-Luyssen

contribs: Fix x265 build with recent GCC

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=1ec161336a07103a3291792fb7512b2c5e698ec3
---

 contrib/src/x265/gcc6-build.patch | 22 ++++++++++++++++++++++
 contrib/src/x265/rules.mak        |  1 +
 2 files changed, 23 insertions(+)

diff --git a/contrib/src/x265/gcc6-build.patch b/contrib/src/x265/gcc6-build.patch
new file mode 100644
index 0000000..0d118e7
--- /dev/null
+++ b/contrib/src/x265/gcc6-build.patch
@@ -0,0 +1,22 @@
+--- x265/source/encoder/ratecontrol.cpp.orig	2016-12-07 11:36:58.694172335 +0100
++++ x265/source/encoder/ratecontrol.cpp	2016-12-07 11:37:22.990215303 +0100
+@@ -48,7 +48,7 @@
+ {\
+     bErr = 0;\
+     p = strstr(opts, opt "=");\
+-    char* q = strstr(opts, "no-"opt);\
++    char* q = strstr(opts, "no-" opt);\
+     if (p && sscanf(p, opt "=%d" , &i) && param_val != i)\
+         bErr = 1;\
+     else if (!param_val && !q)\
+--- x265/source/common/param.cpp.orig	2016-12-07 11:36:10.430085438 +0100
++++ x265/source/common/param.cpp	2016-12-07 11:36:32.238124965 +0100
+@@ -1196,7 +1196,7 @@
+         return NULL;
+ 
+ #define BOOL(param, cliopt) \
+-    s += sprintf(s, " %s", (param) ? cliopt : "no-"cliopt);
++    s += sprintf(s, " %s", (param) ? cliopt : "no-" cliopt);
+ 
+     s += sprintf(s, "%dx%d", p->sourceWidth,p->sourceHeight);
+     s += sprintf(s, " fps=%u/%u", p->fpsNum, p->fpsDenom);
diff --git a/contrib/src/x265/rules.mak b/contrib/src/x265/rules.mak
index aa8efeb..fcdb61f 100644
--- a/contrib/src/x265/rules.mak
+++ b/contrib/src/x265/rules.mak
@@ -27,6 +27,7 @@ x265: x265-$(X265_VERSION).tar.bz2 .sum-x265
 	mkdir -p $@-$(X265_VERSION)
 	$(BZCAT) "$<" | (cd $@-$(X265_VERSION) && tar xv --strip-components=1)
 	$(call pkg_static,"source/x265.pc.in")
+	$(APPLY) $(SRC)/x265/gcc6-build.patch
 	$(MOVE)
 
 .x265: x265 toolchain.cmake



More information about the vlc-commits mailing list