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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1918>
This commit is contained in:
Sebastian Dröge 2020-12-29 13:15:10 +02:00 committed by GStreamer Merge Bot
parent 68a47eb316
commit b258144c16

View file

@ -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;