msdk: assign the returned value to status variable
authorHaihao Xiang <haihao.xiang@intel.com>
Tue, 11 Dec 2018 07:04:12 +0000 (15:04 +0800)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 12 Dec 2018 17:24:00 +0000 (17:24 +0000)
Othervise the subsequent check will use the stale value of status
variable

sys/msdk/msdk.c

index 0be07cb..17809d6 100644 (file)
@@ -169,14 +169,14 @@ msdk_open_session (mfxIMPL impl)
     goto failed;
   }
 
-  MFXQueryIMPL (session, &implementation);
+  status = MFXQueryIMPL (session, &implementation);
   if (status != MFX_ERR_NONE) {
     GST_ERROR ("Query implementation failed (%s)",
         msdk_status_to_string (status));
     goto failed;
   }
 
-  MFXQueryVersion (session, &version);
+  status = MFXQueryVersion (session, &version);
   if (status != MFX_ERR_NONE) {
     GST_ERROR ("Query version failed (%s)", msdk_status_to_string (status));
     goto failed;