[FFmpeg-devel] [PATCH v3] qsv: fix the dangerous macro definitions

Zhong Li zhong.li at intel.com
Thu Mar 28 15:40:33 EET 2019


Signed-off-by: Zhong Li <zhong.li at intel.com>
Reviewed-by: Carl Eugen Hoyos <ceffmpeg at gmail.com>
---
 libavcodec/qsv_internal.h | 4 ++--
 libavfilter/qsvvpp.h      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h
index 394c558883..57d861d2be 100644
--- a/libavcodec/qsv_internal.h
+++ b/libavcodec/qsv_internal.h
@@ -39,8 +39,8 @@
      MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >= (MINOR))
 
 #define QSV_RUNTIME_VERSION_ATLEAST(MFX_VERSION, MAJOR, MINOR) \
-    (MFX_VERSION.Major > (MAJOR)) ||                           \
-    (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR))
+    ((MFX_VERSION.Major > (MAJOR)) ||                           \
+    (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR)))
 
 typedef struct QSVMid {
     AVBufferRef *hw_frames_ref;
diff --git a/libavfilter/qsvvpp.h b/libavfilter/qsvvpp.h
index ff02b64c41..c2bcce7548 100644
--- a/libavfilter/qsvvpp.h
+++ b/libavfilter/qsvvpp.h
@@ -36,8 +36,8 @@
      MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >= (MINOR))
 
 #define QSV_RUNTIME_VERSION_ATLEAST(MFX_VERSION, MAJOR, MINOR) \
-    (MFX_VERSION.Major > (MAJOR)) ||                           \
-    (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR))
+    ((MFX_VERSION.Major > (MAJOR)) ||                           \
+    (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR)))
 
 typedef struct QSVVPPContext QSVVPPContext;
 
-- 
2.17.1



More information about the ffmpeg-devel mailing list