mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
audiosrc: Leave read loop if no longer running
In the case a src stops providing data (read calls returns 0). The audio src thread will never leave. Instead, check the condition and leave the loop.
This commit is contained in:
parent
3cc9b2c490
commit
eddb543719
1 changed files with 2 additions and 1 deletions
|
@ -246,7 +246,8 @@ audioringbuffer_thread_func (GstAudioRingBuffer * buf)
|
|||
}
|
||||
left -= read;
|
||||
readptr += read;
|
||||
} while (left > 0);
|
||||
|
||||
} while (left > 0 && g_atomic_int_get (&abuf->running));
|
||||
|
||||
/* Update timestamp on buffer if required */
|
||||
gst_audio_ring_buffer_set_timestamp (buf, readseg, timestamp);
|
||||
|
|
Loading…
Reference in a new issue