From c521fba4a64b34f98b608aed53d356641c205681 Mon Sep 17 00:00:00 2001 From: Philippe G Date: Sun, 10 Jan 2021 02:23:23 -0800 Subject: [PATCH] pcm remaining bytes guardrail --- components/squeezelite/pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/squeezelite/pcm.c b/components/squeezelite/pcm.c index 0221255b..063a9f15 100644 --- a/components/squeezelite/pcm.c +++ b/components/squeezelite/pcm.c @@ -204,7 +204,7 @@ static decode_state pcm_decode(void) { out = process.max_in_frames; ); - if ((stream.state <= DISCONNECT && bytes == 0) || (limit && audio_left == 0)) { + if ((stream.state <= DISCONNECT && bytes < bytes_per_frame) || (limit && audio_left == 0)) { UNLOCK_O_direct; UNLOCK_S; return DECODE_COMPLETE;