OggPacketWriter allows no correct GP setting on continuation pages
Closed this issue · 3 comments
When adding a packet to a OggPacketWriter instance, the current page checks whether the lacing value list is full (numLVs > 255) or if the packet is the last one on this page (numLVs == 255) and the packet can't be written fully on the page. OggPacketWriter then starts a new page and sets the continuation bit. No flush is called in this situation. This means the granulePosition of the old and the new page will be the same at the next flush, there is no control of setting the gp on these pages afterwards.
This is ok for large packets (>64kb), but not for other uses like transcoding and changing the latency (maximum ogg page sizes).
Do you have any thoughts on the best way to solve this? Perhaps following the same approach as in the C library, if that's possible?