mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
basesrc: make sure we wait and release the live lock
Make sure we release the live lock and wait in all cases when we need to wait for the playing or flushing state change. Fixes #635785
This commit is contained in:
parent
8edee55a3a
commit
5c479aa3a4
1 changed files with 3 additions and 2 deletions
|
@ -491,14 +491,15 @@ gst_base_src_wait_playing (GstBaseSrc * src)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GST_IS_BASE_SRC (src), GST_FLOW_ERROR);
|
g_return_val_if_fail (GST_IS_BASE_SRC (src), GST_FLOW_ERROR);
|
||||||
|
|
||||||
while (G_UNLIKELY (!src->live_running)) {
|
do {
|
||||||
/* block until the state changes, or we get a flush, or something */
|
/* block until the state changes, or we get a flush, or something */
|
||||||
GST_DEBUG_OBJECT (src, "live source waiting for running state");
|
GST_DEBUG_OBJECT (src, "live source waiting for running state");
|
||||||
GST_LIVE_WAIT (src);
|
GST_LIVE_WAIT (src);
|
||||||
GST_DEBUG_OBJECT (src, "live source unlocked");
|
GST_DEBUG_OBJECT (src, "live source unlocked");
|
||||||
if (src->priv->flushing)
|
if (src->priv->flushing)
|
||||||
goto flushing;
|
goto flushing;
|
||||||
}
|
} while (G_UNLIKELY (!src->live_running));
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
|
|
Loading…
Reference in a new issue