always copy granule unless it's -1 (not valid)

This commit is contained in:
philippe44
2024-01-03 23:47:00 -08:00
parent f677695fc7
commit 01320db007

View File

@@ -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;