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
@ -246,7 +246,8 @@ audioringbuffer_thread_func (GstAudioRingBuffer * buf)
|
|||||||
}
|
}
|
||||||
left -= read;
|
left -= read;
|
||||||
readptr += read;
|
readptr += read;
|
||||||
} while (left > 0);
|
|
||||||
|
} while (left > 0 && g_atomic_int_get (&abuf->running));
|
||||||
|
|
||||||
/* Update timestamp on buffer if required */
|
/* Update timestamp on buffer if required */
|
||||||
gst_audio_ring_buffer_set_timestamp (buf, readseg, timestamp);
|
gst_audio_ring_buffer_set_timestamp (buf, readseg, timestamp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user