diff --git a/components/squeezelite/opus.c b/components/squeezelite/opus.c index 8e36ee49..73cd86a0 100644 --- a/components/squeezelite/opus.c +++ b/components/squeezelite/opus.c @@ -219,9 +219,14 @@ static decode_state opus_decompress(void) { } else if (n == 0) { - LOG_INFO("end of stream"); - UNLOCK_O_direct; - return DECODE_COMPLETE; + if (stream.state <= DISCONNECT) { + LOG_INFO("partial decode"); + UNLOCK_O_direct; + UNLOCK_S; + return DECODE_COMPLETE; + } else { + LOG_INFO("no frame decoded"); + } } else if (n == OP_HOLE) { diff --git a/components/squeezelite/vorbis.c b/components/squeezelite/vorbis.c index f42fd068..99d0309d 100644 --- a/components/squeezelite/vorbis.c +++ b/components/squeezelite/vorbis.c @@ -266,9 +266,14 @@ static decode_state vorbis_decode(void) { } else if (n == 0) { - LOG_INFO("end of stream"); - UNLOCK_O_direct; - return DECODE_COMPLETE; + if (stream.state <= DISCONNECT) { + LOG_INFO("partial decode"); + UNLOCK_O_direct; + UNLOCK_S; + return DECODE_COMPLETE; + } else { + LOG_INFO("no frame decoded"); + } } else if (n == OV_HOLE) {