d3d12screencapturesrc: Fix infinite negotiation on resolution change

Updates crop rect if previous capture got error. The error might
result from resolution change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8444>
This commit is contained in:
Seungha Yang 2025-02-10 19:51:57 +09:00 committed by GStreamer Marge Bot
parent 1902b5ca1b
commit 967ab2dc50

View file

@ -1312,6 +1312,7 @@ gst_d3d12_screen_capture_src_dxgi_capture (GstBaseSrc * bsrc,
if (fps_n <= 0 || fps_d <= 0)
return GST_FLOW_NOT_NEGOTIATED;
again:
{
std::lock_guard < std::recursive_mutex > lk (priv->lock);
draw_mouse = priv->show_cursor;
@ -1328,7 +1329,6 @@ gst_d3d12_screen_capture_src_dxgi_capture (GstBaseSrc * bsrc,
}
}
again:
auto clock = gst_element_get_clock (GST_ELEMENT_CAST (self));
/* Check flushing before waiting clock because we are might be doing