[Webkit-unassigned] [Bug 154235] [GTK][GStreamer] ClearKey EME v1 decryption support
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 19 07:01:46 PST 2016
https://bugs.webkit.org/show_bug.cgi?id=154235
--- Comment #27 from Philippe Normand <pnormand at igalia.com> ---
Comment on attachment 271332
--> https://bugs.webkit.org/attachment.cgi?id=271332
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=271332&action=review
>> Source/WebCore/platform/graphics/gstreamer/WebKitCommonEncryptionDecryptorGStreamer.cpp:305
>> + if (self) {
>
> This is not correct way to check if self is still alive. You should either use a weak ref/ptr, or protect the object with GRefPtr, and capture that.
I tried to use WeakPtr but the captured value stores nothing in the lambda.
>> Source/WebCore/platform/graphics/gstreamer/WebKitCommonEncryptionDecryptorGStreamer.cpp:310
>> + self->priv->protectionEvent = nullptr;
>
> Use GRefPtr for this. I don't understand why we need to keep the protectionEvent as a member of WebKitMediaCommonEncryptionDecrypt, we could use GrefPtr and capture it in the lambda.
We only need to keep it referenced until the initData is no longer needed. If a GRefPtr captured in the lambda can do that, then yeah, let's use the fancy stuff :)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160219/4c459469/attachment.html>
More information about the webkit-unassigned
mailing list