mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-25 01:54:17 +00:00
audiosrc: avoid deadlock
This commit is contained in:
parent
e02a164a36
commit
ea9bc40bf9
1 changed files with 5 additions and 0 deletions
|
@ -247,6 +247,11 @@ audioringbuffer_thread_func (GstRingBuffer * buf)
|
|||
GST_OBJECT_LOCK (abuf);
|
||||
if (!abuf->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 (src, "signal wait");
|
||||
GST_AUDIORING_BUFFER_SIGNAL (buf);
|
||||
GST_DEBUG_OBJECT (src, "wait for action");
|
||||
|
|
Loading…
Reference in a new issue