From 90f37b75ce760a5e342ccf4d30c3b8218ce42125 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Wed, 18 Jan 2017 23:37:26 +0100 Subject: [PATCH] [player] Fix it so source_read() returns silence and not an error until source_check stops playback --- src/player.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/player.c b/src/player.c index de3f4d8e..24ae595f 100644 --- a/src/player.c +++ b/src/player.c @@ -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)