[FFmpeg-cvslog] qsv: fix the dangerous macro definitions

Zhong Li git at videolan.org
Thu Mar 28 16:00:51 EET 2019


ffmpeg | branch: master | Zhong Li <zhong.li at intel.com> | Wed Mar 27 18:18:15 2019 +0800| [4131b0619c22cc0da29e95ea16b2970e2e3a566e] | committer: Zhong Li

qsv: fix the dangerous macro definitions

Signed-off-by: Zhong Li <zhong.li at intel.com>
Reviewed-by: Carl Eugen Hoyos <ceffmpeg at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4131b0619c22cc0da29e95ea16b2970e2e3a566e
---

 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;
 



More information about the ffmpeg-cvslog mailing list