From 01320db007f182e9886f60fae456a1a2e0832082 Mon Sep 17 00:00:00 2001 From: philippe44 Date: Wed, 3 Jan 2024 23:47:00 -0800 Subject: [PATCH] always copy granule unless it's -1 (not valid) --- components/squeezelite/stream.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/squeezelite/stream.c b/components/squeezelite/stream.c index 589ef4185..528266604 100644 --- a/components/squeezelite/stream.c +++ b/components/squeezelite/stream.c @@ -240,8 +240,10 @@ static void stream_ogg(size_t n) { // otherwise, jump over data ogg.state = OGG_SYNC; ogg.data = NULL; - ogg.granule = ogg.header.granule; } + + // memorize granule for next page + if (ogg.header.granule != -1) ogg.granule = ogg.header.granule; break; case OGG_PAGE: { u32_t offset = 0;