VPAAMP-422 update isobmff#1519
Open
p-bond wants to merge 28 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes the ISOBMFF parser/buffer code toward C++17 idioms by replacing raw-owned box collections with std::unique_ptr, adding read-only buffer handling, and hardening parsing against malformed box sizes.
Changes:
- Converts parsed box ownership from raw pointers to
std::unique_ptr. - Adds read-only buffer mutation guards and malformed size checks.
- Updates ISOBMFF unit tests and fakes for the new ownership model and new malformed-input cases.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
isobmff/isobmffbox.h |
Replaces parsing macros with inline helpers and updates box/container ownership APIs. |
isobmff/isobmffbox.cpp |
Updates box construction/container parsing for unique_ptr ownership and malformed input handling. |
isobmff/isobmffbuffer.h |
Updates buffer internals/API signatures for unique_ptr boxes and read-only state. |
isobmff/isobmffbuffer.cpp |
Applies ownership changes, read-only mutation guards, and size validation during parsing/restamping. |
isobmff/isobmffprocessor.h |
Replaces NULL constructor defaults with nullptr. |
isobmff/isobmffprocessor.cpp |
Replaces a NULL comparison with nullptr. |
MetadataProcessor.cpp |
Adapts metadata box construction to the new unique_ptr return type. |
test/utests/fakes/FakeIsoBmffBuffer.cpp |
Updates fake signatures for the new box container type. |
test/utests/tests/IsoBmffBoxTests/IsoBmffBoxTests.cpp |
Updates tests for unique_ptr construction and malformed nested/emsg boxes. |
test/utests/tests/IsoBmffBufferTests/IsoBmffBufferTests.cpp |
Updates buffer tests for unique_ptr parsed boxes and read-only/malformed input behavior. |
…chars) & make headersize constexpr
jfagunde
reviewed
Jun 1, 2026
cpc005
reviewed
Jun 1, 2026
cpc005
reviewed
Jun 1, 2026
cpc005
reviewed
Jun 1, 2026
cpc005
reviewed
Jun 2, 2026
converted temporary malloc/free branches to RAII with unique_ptr + std::free deleter used explicit ownership transfer only at setMessage/setSchemeIdUri/setValue boundaries added allocation-failure guards that return a safe default EMSG object
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.
Modernise & clean up ISOBMFF code so it is more idiomatic to C++17.
Remove the macros, remove the raw pointer use and protect the API.
(NB - does not remove duplicate code from middleware, that's the next ticket)