mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
audiosink: avoid deadlocking audioringbuffer thread
... when it goes into wait for ringbuffer starting just after such having been signalled. Fixes #661738.
This commit is contained in:
parent
88491ff2e7
commit
d430eb65c5
1 changed files with 5 additions and 0 deletions
|
@ -265,6 +265,11 @@ audioringbuffer_thread_func (GstRingBuffer * buf)
|
||||||
GST_OBJECT_LOCK (abuf);
|
GST_OBJECT_LOCK (abuf);
|
||||||
if (!abuf->running)
|
if (!abuf->running)
|
||||||
goto stop_running;
|
goto stop_running;
|
||||||
|
if (G_UNLIKELY (g_atomic_int_get (&buf->state) ==
|
||||||
|
GST_RING_BUFFER_STATE_STARTED)) {
|
||||||
|
GST_OBJECT_UNLOCK (abuf);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
GST_DEBUG_OBJECT (sink, "signal wait");
|
GST_DEBUG_OBJECT (sink, "signal wait");
|
||||||
GST_AUDIORING_BUFFER_SIGNAL (buf);
|
GST_AUDIORING_BUFFER_SIGNAL (buf);
|
||||||
GST_DEBUG_OBJECT (sink, "wait for action");
|
GST_DEBUG_OBJECT (sink, "wait for action");
|
||||||
|
|
Loading…
Reference in a new issue