d3d12screencapturesrc: Fix deadlock on error

Don't try to wait for non-signalled fence

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7293>
This commit is contained in:
Seungha Yang 2024-08-02 03:02:08 +09:00 committed by GStreamer Marge Bot
parent f77189a7bf
commit f5cd00fbd2

View file

@ -1470,6 +1470,7 @@ gst_d3d12_dxgi_capture_do_capture (GstD3D12DxgiCapture * capture,
priv->fence_val++;
ret = priv->ctx->Execute (texture, (D3D11_BOX *) crop_box, priv->fence_val);
if (ret != GST_FLOW_OK) {
priv->fence_val--;
priv->WaitGPU ();
priv->ctx = nullptr;
if (ret == GST_D3D12_SCREEN_CAPTURE_FLOW_EXPECTED_ERROR) {