Closed Bug 1519919 Opened 5 years ago Closed 5 years ago

Create testcase to ensure MP4 parser is tolerant of tracks that use track_id 0

Categories

(Core :: Audio/Video: Playback, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: bryce, Assigned: bryce)

References

Details

Attachments

(3 files)

We've been inadvertently parsing MP4's that use track_id 0 for a long time. With the changes in bug 1519617 we're now explicitly doing so.

We should have test coverage for this. While files using track_id 0 are in violation of the spec (track_id should be non-zero), we can probably cobble something together from files in the wild, or binary edit some of our existing test files.

Priority: -- → P2

Add a copy of bipbop.mp4 that has been fragmented via mp4box.exe bipbop.mp4 -dash 10000 -subsegs-per-sidx -1 and then hex edited the track_id for video to
be 0. Add this to our already existing MP4Metadata and MoofParser gtests.

Also construct a new gtest to ensure that requesting track 0 from the MoofParser
doesn't result in all tracks being parsed. Historically this would have happened
and could result in bad metadata if the caller expected just track 0 to be
parsed.

Test that an init segment for a video track that uses track_id 0 is correctly
parsed and that the MoofParser picks up the expected crypto data.

Depends on D17069

Add a test file that has a moov with two tracks, but which has had the track
fragment headers removed for the second track. Created from bipbop.mp4 via:
mp4box bipbop.mp4 -dash 5000 -subsegs-per-sidx -1 -segment-name $Segment=bipbop_$$Init=bipbop_init$, concatenating the init and segments
back into an mp4, then overwriting track 2's trafs with frees.

While we shouldn't expect people to create files such as this, it does simulate
if the MoofParser is fed metadata for multiple tracks, but then is not fed
fragments for one of these tracks. This appears to have been the case when bug
1519617 broke soundcloud.com, so we should have test coverage for this.

Depends on D17070

Pushed by bvandyk@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9c283051e8dd
Add gtest to ensure MoofParser does not parse all tracks when given track_id 0. r=jya
https://hg.mozilla.org/integration/autoland/rev/be07411d6334
Add gtest to check the MoofParser handles crypto when parsing tracks with track_id 0. r=jya
https://hg.mozilla.org/integration/autoland/rev/e8eccfe76a93
Add gtest for the MoofParser handling moovs with multiple tracks followed by moofs with only 1 track. r=jya
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: