mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-25 20:16:14 -05:00
[player] Fix handling of underrun/read_deficit
* Also call full_cb() from input_wait if buffer is full * Make read_deficit count missing bytes instead of clock ticks * Make read_deficit a part of the playback session
This commit is contained in:
@@ -477,6 +477,12 @@ input_wait(void)
|
||||
// Is the buffer full?
|
||||
if (evbuffer_get_length(input_buffer.evbuf) > INPUT_BUFFER_THRESHOLD)
|
||||
{
|
||||
if (input_buffer.full_cb)
|
||||
{
|
||||
input_buffer.full_cb();
|
||||
input_buffer.full_cb = NULL;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&input_buffer.mutex);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user