mfvideoencoder: Check HRESULT code as well for GPU sync
authorSeungha Yang <seungha@centricular.com>
Sat, 26 Mar 2022 12:43:50 +0000 (21:43 +0900)
committerSeungha Yang <seungha@centricular.com>
Sat, 28 May 2022 14:12:53 +0000 (23:12 +0900)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2037>

subprojects/gst-plugins-bad/sys/mediafoundation/gstmfvideoencoder.cpp

index 2e896b31f4edd2982cec0b50ee388b7f19eb2050..d826c81bc2150ddfe2f597aa4cd227dd2c64b563 100644 (file)
@@ -1164,7 +1164,7 @@ gst_mf_video_encoder_create_input_sample_d3d11 (GstMFVideoEncoder * self,
 
   /* Wait until all issued GPU commands are finished */
   do {
-    context_handle->GetData (query.Get (), &sync_done, sizeof (BOOL), 0);
+    hr = context_handle->GetData (query.Get (), &sync_done, sizeof (BOOL), 0);
   } while (!sync_done && (hr == S_OK || hr == S_FALSE));
 
   if (!gst_d3d11_result (hr, dmem->device)) {