[WIP] add support for iloc construction method 2 #1129
Draft
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.
The
iloc
box, as described in ISO/IEC 14496-12:2022 Section 8.11.3, has a few variations.Currently we support
construction_method
values of 0 (where the item content is in themdat
box), and 1 (where the item content is in theidat
box). Version 0 of the box definition is equivalent to method 0.There is also method 2, which is an indirection to the
dref
child boxes. Typically its aurl
box.An indicative file structure might be:
The reason for wanting this is to "wrap" existing files (e.g. TIFF, JPEG) with a HEIF header so I can add metadata, without needing to duplicate the content that would otherwise go into the
mdat
box.There are a few combinations that this doesn't handle:
moof
caseurn
,snim
andimdt
I have a plan to fix the last one (maybe using cpr - https://github.com/libcpr/cpr).
However there are a couple of issues:
I would appreciate suggestions on both.
For the security issue, I've considered combinations of: