Skip to content

Recognize ISO 13818-7 MPEG-2 object types for AAC. #326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 1, 2021

Conversation

kinetiknz
Copy link
Collaborator

Object types sourced from https://mp4ra.org/#/object_types.

This addresses BMO 1722497. I included 0x66 as well, since that's listed in the above reference as another (uncommon) AAC object type.

Curiously, the 0x41 object type we've accepted since this code was first added isn't listed. I'm not sure where that value came from.

@kinetiknz kinetiknz self-assigned this Aug 5, 2021
@baumanj
Copy link
Contributor

baumanj commented Oct 13, 2021

Apologies for the very delayed review. The added code all looks good.

Curiously, the 0x41 object type we've accepted since this code was first added isn't listed. I'm not sure where that value came from.

Having looked through #38, I think it may be an oversight. Per the MPEG-4 spec (ISO/IEC 14496-1:2010) § 7.2.6.6.2:

0x40: Audio ISO/IEC 14496-3
0x41-0x5F: reserved for ISO use

I've also checked the 2 published amendments and they don't revise this range at all.

I tried changing the 0x40 to a 0x41 in this sample file, and that still works in Firefox, but it's rejected by Chrome, Safari and QuickTime Player, so I'm fairly confident that's an error on our part to accept it. I think we should probably remove the 0x41, but it might make sense to bring that change in at the beginning of the next nightly cycle (Nov 1) so we have ample time for it to show up if that code is being used in the wild.

Would you rather do that as a separate change?

@kinetiknz
Copy link
Collaborator Author

Thanks for looking into 0x41 further - I wasn't able to find any reference (including in the old stagefright code) suggesting it should be treated as anything but a reserved OTI. I've added a second commit to this PR to remove it. Merging after the next nightly cycle sounds like a great plan.

It's not clear why this was ever treated as AAC, but the original code
addition included it.  0x41 is listed a reserved type in the specs.
There was no special handling of 0x41 in stagefright, so this doesn't
seem to be a compatibility carry-over from there, either.

See PR 126 for further rationale.
@baumanj baumanj merged commit a257137 into mozilla:master Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants