From b258144c1686b648fb5bda0ca56a2c6186346853 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 29 Dec 2020 13:15:10 +0200 Subject: [PATCH] assrender: Don't try unlocking unlocked mutex When flushing right at the beginning of the video chain function or when failing negotiation at the top of the function, the assrender mutex would be unlocked without being previously locked. Part-of: --- ext/assrender/gstassrender.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/assrender/gstassrender.c b/ext/assrender/gstassrender.c index e99458b..e6d3198 100644 --- a/ext/assrender/gstassrender.c +++ b/ext/assrender/gstassrender.c @@ -1171,7 +1171,7 @@ gst_ass_render_chain_video (GstPad * pad, GstObject * parent, if (!gst_ass_render_negotiate (render, NULL)) { gst_pad_mark_reconfigure (render->srcpad); if (GST_PAD_IS_FLUSHING (render->srcpad)) - goto flushing; + goto flushing_no_unlock; else goto not_negotiated; } @@ -1443,7 +1443,6 @@ missing_timestamp: } not_negotiated: { - GST_ASS_RENDER_UNLOCK (render); GST_DEBUG_OBJECT (render, "not negotiated"); gst_buffer_unref (buffer); return GST_FLOW_NOT_NEGOTIATED; @@ -1451,6 +1450,9 @@ not_negotiated: flushing: { GST_ASS_RENDER_UNLOCK (render); + } +flushing_no_unlock: + { GST_DEBUG_OBJECT (render, "flushing, discarding buffer"); gst_buffer_unref (buffer); return GST_FLOW_FLUSHING; -- 2.7.4