Closed Bug 1509397 Opened 11 months ago Closed 11 months ago

Mp4 parser should use per sample IV size from sample group if present

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: bryce, Assigned: bryce)

Details

Attachments

(1 file)

MP4 encryption metadata may be present at several levels, each applying to a more specific unit of media. Data may be present at the track level, the sample group level, or at the individual sample level.

If the same metadata is specified at multiple levels, we should use the more specific metadata. I.e. if a track specifies a per sample IV size, and a sample group in that same track also specifies a per sample IV size, we should opt to use the more specific sample group metadata.

We are not currently doing this for the per sample IV size mentioned above. We will read this value from the track information but will not use the sample grouping per sample IV size if it is present.

Bug 1318792 introduced reading information from sample group and using this instead of the track information, but only does so for the key id. We should also be doing so for the per sample IV size.

I suspect this functionality is not exercised much and/or that the per sample IV size is often the same in the sample group as the track,  as we don't seem to be running into issues. However, we should do this to comply with the spec.
If sample group metadata is present, it should be used over the less specific
track metadata. This patch changes the mp4 parser to do so for per sample IV
sizes.
Pushed by bvandyk@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1924c38b2063
mp4: use per sample IV size from sample group metadata if present. r=jya
https://hg.mozilla.org/mozilla-central/rev/1924c38b2063
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.