basesink: don't unlock mutex that is not locked

Fixes 'Attempt to unlock mutex that was not locked'
warning with newer GLibs when sink is shut down in
certain situations. Triggered by the decodebin
test_reuse_without_decoders unit test in -base
sometimes, esp. on slower machines.
This commit is contained in:
Tim-Philipp Müller 2014-10-24 12:51:07 +01:00
parent 1affe7ef07
commit 989e97d1dd

View file

@ -1507,7 +1507,7 @@ gst_base_sink_commit_state (GstBaseSink * basesink)
/* state change function could have been executed and we could be
* flushing now */
if (G_UNLIKELY (basesink->flushing))
goto stopping;
goto stopping_unlocked;
}
GST_DEBUG_OBJECT (basesink, "posting PLAYING state change message");
/* FIXME, we released the PREROLL lock above, it's possible that this
@ -1547,6 +1547,11 @@ nothing_pending:
GST_OBJECT_UNLOCK (basesink);
return TRUE;
}
stopping_unlocked:
{
GST_OBJECT_LOCK (basesink);
goto stopping;
}
stopping:
{
/* app is going to READY */