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 2e896b3..d826c81 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)) {