From 37c760e8f9a77b62c6a2ef04fa2fd6f751d3a019 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Fri, 30 Jun 2023 21:39:49 +0900 Subject: [PATCH] decklink2sink: Don't hold lock while stopping Driver may wait for callback thread to join() but we takes the same lock there --- .../gst-plugins-bad/sys/decklink2/gstdecklink2output.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/sys/decklink2/gstdecklink2output.cpp b/subprojects/gst-plugins-bad/sys/decklink2/gstdecklink2output.cpp index d8fcb5e9e8..c6fe341127 100644 --- a/subprojects/gst-plugins-bad/sys/decklink2/gstdecklink2output.cpp +++ b/subprojects/gst-plugins-bad/sys/decklink2/gstdecklink2output.cpp @@ -1099,6 +1099,7 @@ gst_decklink2_output_stop_internal (GstDeckLink2Output * self) std::unique_lock < std::mutex > lk (priv->schedule_lock); /* Steal last frame to avoid re-rendering */ GST_DECKLINK2_CLEAR_COM (self->last_frame); + lk.unlock (); switch (self->api_level) { case GST_DECKLINK2_API_LEVEL_10_11: @@ -1115,7 +1116,6 @@ gst_decklink2_output_stop_internal (GstDeckLink2Output * self) g_assert_not_reached (); break; } - lk.unlock (); GST_DEBUG_OBJECT (self, "StopScheduledPlayback result 0x%x", (guint) hr);