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.
/* 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
GST_OBJECT_UNLOCK (basesink);
return TRUE;
}
+stopping_unlocked:
+ {
+ GST_OBJECT_LOCK (basesink);
+ goto stopping;
+ }
stopping:
{
/* app is going to READY */