mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-15 00:35:55 -04:00
[player] Fix it so source_read() returns silence and not an error until source_check stops playback
This commit is contained in:
parent
9fb62441d2
commit
90f37b75ce
@ -1077,8 +1077,12 @@ source_read(uint8_t *buf, int len)
|
|||||||
int ret;
|
int ret;
|
||||||
short flags;
|
short flags;
|
||||||
|
|
||||||
|
// Nothing to read, stream silence until source_check() stops playback
|
||||||
if (!cur_streaming)
|
if (!cur_streaming)
|
||||||
return -1;
|
{
|
||||||
|
memset(buf, 0, len);
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
nbytes = input_read(buf, len, &flags);
|
nbytes = input_read(buf, len, &flags);
|
||||||
if (nbytes < 0)
|
if (nbytes < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user