diff mbox series

[FFmpeg-devel,1/2] qsv: needn't load user plugin since libmfx 1.28

Message ID 20200819061023.443304-1-haihao.xiang@intel.com
State Superseded
Headers show
Series [FFmpeg-devel,1/2] qsv: needn't load user plugin since libmfx 1.28 | expand

Checks

Context Check Description
andriy/default pending
andriy/configure warning Failed to apply patch

Commit Message

Xiang, Haihao Aug. 19, 2020, 6:10 a.m. UTC
MFXVideoUSER_Load call is redundant since libmfx 1.28
---
 libavcodec/qsv.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 55184e075a..faa424bb68 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -19,7 +19,6 @@ 
  */
 
 #include <mfxvideo.h>
-#include <mfxplugin.h>
 #include <mfxjpeg.h>
 
 #include <stdio.h>
@@ -36,6 +35,10 @@ 
 #include "avcodec.h"
 #include "qsv_internal.h"
 
+#if !QSV_VERSION_ATLEAST(1, 28)
+#include <mfxplugin.h>
+#endif
+
 #if QSV_VERSION_ATLEAST(1, 12)
 #include "mfxvp8.h"
 #endif
@@ -295,6 +298,9 @@  enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type)
 static int qsv_load_plugins(mfxSession session, const char *load_plugins,
                             void *logctx)
 {
+#if QSV_VERSION_ATLEAST(1, 28)
+    return 0;
+#else
     if (!load_plugins || !*load_plugins)
         return 0;
 
@@ -340,6 +346,7 @@  load_plugin_fail:
     }
 
     return 0;
+#endif
 
 }