[player] Fix it so source_read() returns silence and not an error until source_check stops playback

This commit is contained in:
ejurgensen 2017-01-18 23:37:26 +01:00
parent 9fb62441d2
commit 90f37b75ce

View File

@ -1077,8 +1077,12 @@ source_read(uint8_t *buf, int len)
int ret;
short flags;
// Nothing to read, stream silence until source_check() stops playback
if (!cur_streaming)
return -1;
{
memset(buf, 0, len);
return len;
}
nbytes = input_read(buf, len, &flags);
if (nbytes < 0)