Extend avc1 to support multiple video sample description extensions #6
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.
avc1 can support multiple extensions including avcC and pasp
Not sure where this is documented in ISO standards, I found it in an mp4 file and then found it documented for quicktime https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html
avcC has optional fields at the end which are now ignored with GreedyBytes if present, without this tweak I had mp4 files I couldn't parse if they had any extra info after the pps.
I'm using the BytesIO so that I can assert the expected data was parsed.
Note this is a breaking change since avcC used to be stored in avc_data but is now stored in extensions[avcC]. In QT the order is not defined so I think the extensions list is the right way to handle it.