Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make parsing of the OBU list in AV1Packet optional
In Pion, the (*XXXPacket).Unmarshal operation is supposed to be fast and perform no allocation, as it is sometimes used to check just a single flag in the packet header. The AV1Packet implementation breaks this property by parsing the whole list of OBUs at Unmarshal time, even though it is likely to be unneeded. The proper solution would be to remove the parsing of OBUs from Unmarshal, for consistency with the other packet formats. Unfortunately, this would break backwards compatibility. We therefore introduce a field DontParseOBUs which controls the parsing. Unfortunately, this means that the inefficient path is the default, which smells really badly, but there's not much we can do about it at this stage.
- Loading branch information