[FFmpeg-devel,2/2] lavu/qsv: remove the redundant libmfx init code

Submitted by Zhong Li on Sept. 4, 2019, 3:40 p.m.

Details

Message ID 1567611642-11353-2-git-send-email-zhong.li@intel.com
State New
Headers show

Commit Message

Zhong Li Sept. 4, 2019, 3:40 p.m.
Signed-off-by: Zhong Li <zhong.li@intel.com>
---
 libavutil/hwcontext_qsv.c | 21 ---------------------
 1 file changed, 21 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 0329a81..802c842 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -1145,27 +1145,6 @@  static int qsv_device_derive_from_child(AVHWDeviceContext *ctx,
 
     err = MFXInit(implementation, &ver, &hwctx->session);
     if (err != MFX_ERR_NONE) {
-        av_log(ctx, AV_LOG_ERROR, "Error initializing an MFX session: "
-               "%d.\n", err);
-        ret = AVERROR_UNKNOWN;
-        goto fail;
-    }
-
-    err = MFXQueryVersion(hwctx->session, &ver);
-    if (err != MFX_ERR_NONE) {
-        av_log(ctx, AV_LOG_ERROR, "Error querying an MFX session: %d.\n", err);
-        ret = AVERROR_UNKNOWN;
-        goto fail;
-    }
-
-    av_log(ctx, AV_LOG_VERBOSE,
-           "Initialize MFX session: API version is %d.%d, implementation version is %d.%d\n",
-           MFX_VERSION_MAJOR, MFX_VERSION_MINOR, ver.Major, ver.Minor);
-
-    MFXClose(hwctx->session);
-
-    err = MFXInit(implementation, &ver, &hwctx->session);
-    if (err != MFX_ERR_NONE) {
         av_log(ctx, AV_LOG_ERROR,
                "Error initializing an MFX session: %d.\n", err);
         ret = AVERROR_UNKNOWN;