mp4a: Support QT sound sample description version 1. #112
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.
If the QT version in a sound sample description is set to 1, there are 4 additional 32-bit integers in the description record according to QT docs.
At least some recently sold iPhones produce sound sample description records like this, so this change fixes a parsing failure for these files.
Not sure if it would be better to actually parse the 4 ints and store them in a struct (using a name like
QtVersion1Data
orSizeInfo
or something like that), that could be added as an Option<> to the Mp4aBox? I really don't care about the audio description though, and it's not an ISO mp4 file, so maybe this crate is less interested in these kinds of files. Although it parses without throwing an error otherwise. I just need the width/height of the video in that mov file, and that works great with this patch, but I'm fine with whatever you prefer.