andygrundman / Audio-Scan

Audio::Scan - Fast Perl XS metadata and tag reader for all common audio file formats
GNU General Public License v2.0
4 stars 13 forks source link

opus: Handle large comment headers #13

Open robho opened 2 years ago

robho commented 2 years ago

A comment header may span multiple pages and in such situations we need to delay parsing until we have read all pages which belong to the comment header packet. The final page in the comment header packet is marked by setting "granule position" to zero.

It's common to have comment headers spanning multiple pages when album art is embedded in an opus file. A single page can contain 65025 bytes so if tags + picture needs more space then additional pages are needed.

Fixes #7.