msdk: Fix mixed declarations warning
authorSeungha Yang <seungha.yang@navercorp.com>
Wed, 27 Nov 2019 03:24:46 +0000 (12:24 +0900)
committerSeungha Yang <seungha.yang@navercorp.com>
Wed, 27 Nov 2019 03:25:40 +0000 (12:25 +0900)
msdk.c:194:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

sys/msdk/msdk.c

index ee60994..83c9a3e 100644 (file)
@@ -191,12 +191,14 @@ msdk_open_session (mfxIMPL impl)
     goto failed;
   }
 #if (MFX_VERSION >= 1019)
-  mfxPlatform platform = { 0 };
-  status = MFXVideoCORE_QueryPlatform (session, &platform);
-  if (MFX_ERR_NONE == status) {
-    GST_INFO ("Detected MFX platform with device code %d", platform.CodeName);
-  } else {
-    GST_WARNING ("Platform auto-detection failed with MFX status %d", status);
+  {
+    mfxPlatform platform = { 0 };
+    status = MFXVideoCORE_QueryPlatform (session, &platform);
+    if (MFX_ERR_NONE == status) {
+      GST_INFO ("Detected MFX platform with device code %d", platform.CodeName);
+    } else {
+      GST_WARNING ("Platform auto-detection failed with MFX status %d", status);
+    }
   }
 #endif