Skip to content

Tolerate nclx colr boxes missing the full_range_flag byte#452

Merged
kinetiknz merged 1 commit into
masterfrom
bug2047239-short-nclx-colr
Jun 13, 2026
Merged

Tolerate nclx colr boxes missing the full_range_flag byte#452
kinetiknz merged 1 commit into
masterfrom
bug2047239-short-nclx-colr

Conversation

@kinetiknz

Copy link
Copy Markdown
Collaborator

Some muxers write an 18-byte nclx colr box that omits the trailing full_range_flag/reserved byte, matching the layout of the QTFF 'nclc' colour type. read_colr failed on these with a fatal BitReaderError, rejecting the whole file, while ffmpeg, Chrome and Safari accept such boxes and treat the range as limited.

Default full_range_flag to false in this case and only reject the short box under ParseStrictness::Strict. Fixes bug 2047239.

Some muxers write an 18-byte nclx colr box that omits the trailing
full_range_flag/reserved byte, matching the layout of the QTFF 'nclc'
colour type. read_colr failed on these with a fatal BitReaderError,
rejecting the whole file, while ffmpeg, Chrome and Safari accept such
boxes and treat the range as limited.

Default full_range_flag to false in this case and only reject the
short box under ParseStrictness::Strict. Fixes bug 2047239.
@kinetiknz kinetiknz self-assigned this Jun 13, 2026
@kinetiknz

Copy link
Copy Markdown
Collaborator Author

@alastor0325 can you review this please?

@alastor0325 alastor0325 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@kinetiknz kinetiknz merged commit 73423e1 into master Jun 13, 2026
44 of 45 checks passed
@kinetiknz kinetiknz deleted the bug2047239-short-nclx-colr branch June 13, 2026 01:55
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.

2 participants