Imported Debian patch 1.4-3~trusty
[deb_x265.git] / debian / patches / bug_fix_for_validatefanout_param_analysis-mode_save_and_load.patch
diff --git a/debian/patches/bug_fix_for_validatefanout_param_analysis-mode_save_and_load.patch b/debian/patches/bug_fix_for_validatefanout_param_analysis-mode_save_and_load.patch
new file mode 100644 (file)
index 0000000..1048433
--- /dev/null
@@ -0,0 +1,16 @@
+--- a/source/x265.cpp
++++ b/source/x265.cpp
+@@ -772,12 +772,9 @@
+     {\
+         bErr = 0;\
+         p = strstr(paramBuf, opt "=");\
+-        char* q = strstr(paramBuf, "no-"opt);\
+         if (p && sscanf(p, opt "=%d" , &i) && param_val != i)\
+             bErr = 1;\
+-        else if (!param_val && !q)\
+-            bErr = 1;\
+-        else if (param_val && (q || !strstr(paramBuf, opt)))\
++        else if (param_val && strstr(paramBuf, "no-"opt))\
+             bErr = 1;\
+         if (bErr)\
+         {\