Closed Bug 1041368 Opened 6 years ago Closed 6 years ago

MP4 crypto plain sizes have wrong number of elements

Categories

(Core :: Audio/Video, defect)

29 Branch
x86_64
Windows 8.1
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
DecoderData.plain_sizes has twice as many entries as DecoderData.encrypted_sizes. It should have the same number of entried.

This is because where the plain sizes are stored into the Metadata [1] they're stored with size (smpl->clearsizes.size() * 4), but smpl->clearsizes is a Vector<uint16_t>, so twice as many bytes are stored, and when we copy them in FindData() inside DecoderData::Update() and divide the reported size by 2, we'll get twice the number.

[1] should be  (smpl->clearsizes.size() * 2), not  (smpl->clearsizes.size() * 4).

[1] http://mxr.mozilla.org/mozilla-central/source/media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp#3457
Attachment #8459366 - Flags: review?(ajones)
Attachment #8459366 - Flags: review?(ajones) → review+
https://hg.mozilla.org/mozilla-central/rev/30364f5f934b
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.