Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opus: Handle large comment headers #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robho
Copy link

@robho robho commented Nov 10, 2022

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad Opus Header with embedded art (possibly over a certain size)
1 participant