Repository navigation
Fix HRD buffering entry count and following field alignment - #9
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HRD parsing treated
cpb_cnt_minus1as the entry count. A valid single-CPB stream therefore skipped its buffering entry and decoded the following delay fields at the wrong bit position. Read allcpb_cnt_minus1 + 1entries and reject counts above the 32-entry storage limit before indexing. This follows H.264 E.1.2 and E.2.2.Add fixed encoded fixtures for 1, 2 and 32 entries, checking every entry, all delay fields and a following cursor sentinel. Document the coverage and count constraint.
Validation: the regression fails before the fix; the full suite passes with V 0.5.2 compatibility mode and current strict V3. A separate malformed 33-entry probe exits at the new count assertion. Linux, Windows/MSVC and pinned V3 checks run in CI.