Closed Bug 1060123 Opened 7 years ago Closed 7 years ago

[EME] GMPEncryptedBufferMetadata lifetime should match associated GMPBuffer

Categories

(Core :: Audio/Video, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35
Tracking Status
firefox37 --- fixed
firefox38 --- fixed
firefox39 --- fixed

People

(Reporter: cpearce, Assigned: eflores)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Edwin pointed out that in our implemetnation of 

void GMPDecryptor::Decrypt(GMPBuffer* aBuffer,
                   GMPEncryptedBufferMetadata* aMetadata)

the lifecycle of GMPEncryptedBufferMetadata is for the duration of the Decryptor call, but the GMPBuffer is supposed to be decrypted asynchronously; i.e. the GMPEncryptedBufferMetadata may be needed after the Decrypt() call returns.
Bit of a kludge, but does the job.
Attachment #8488403 - Flags: review?(cpearce)
Comment on attachment 8488403 [details] [diff] [review]
decrypt-metadata-lifetime.patch

Review of attachment 8488403 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/gmp/GMPDecryptorChild.cpp
@@ +309,5 @@
>    if (!mSession) {
>      return false;
>    }
>  
> +  GMPEncryptedBufferDataImpl* metadata = new GMPEncryptedBufferDataImpl(aMetadata);

Add a comment here about when the metadata is deleted.
Attachment #8488403 - Flags: review?(cpearce) → review+
Assignee: nobody → edwin
https://hg.mozilla.org/mozilla-central/rev/85c5138960fb
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Mass update firefox-status to track EME uplift.
You need to log in before you can comment on or make changes to this bug.