mirror of
https://github.com/taglib/taglib.git
synced 2025-07-19 05:24:25 -04:00
Ogg: Set granule position to -1 if no packets finish on page (#864)
This commit is contained in:
@ -305,4 +305,10 @@ Ogg::Page::Page(const ByteVectorList &packets,
|
||||
}
|
||||
d->packets = packets;
|
||||
d->header.setPacketSizes(packetSizes);
|
||||
|
||||
// https://xiph.org/ogg/doc/framing.html, absolute granule position:
|
||||
// A special value of '-1' (in two's complement) indicates that no packets
|
||||
// finish on this page.
|
||||
if(!lastPacketCompleted && packets.size() <= 1)
|
||||
d->header.setAbsoluteGranularPosition(-1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user