Title: [222105] trunk/Source/WebCore
Revision
222105
Author
[email protected]
Date
2017-09-15 12:55:22 -0700 (Fri, 15 Sep 2017)

Log Message

MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForVideoData should enqueue data if still useful
https://bugs.webkit.org/show_bug.cgi?id=177016

Patch by Youenn Fablet <[email protected]> on 2017-09-15
Reviewed by Jer Noble.

No change of behavior.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForVideoData): exciting early in block to prevent enqueueing.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (222104 => 222105)


--- trunk/Source/WebCore/ChangeLog	2017-09-15 19:54:01 UTC (rev 222104)
+++ trunk/Source/WebCore/ChangeLog	2017-09-15 19:55:22 UTC (rev 222105)
@@ -1,3 +1,15 @@
+2017-09-15  Youenn Fablet  <[email protected]>
+
+        MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForVideoData should enqueue data if still useful
+        https://bugs.webkit.org/show_bug.cgi?id=177016
+
+        Reviewed by Jer Noble.
+
+        No change of behavior.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
+        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForVideoData): exciting early in block to prevent enqueueing.
+
 2017-09-15  Ryan Haddad  <[email protected]>
 
         Unreviewed, rolling out r222040.

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm (222104 => 222105)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm	2017-09-15 19:54:01 UTC (rev 222104)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm	2017-09-15 19:55:22 UTC (rev 222105)
@@ -394,7 +394,11 @@
 
 void MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForVideoData()
 {
+    auto weakThis = createWeakPtr();
     [m_sampleBufferDisplayLayer requestMediaDataWhenReadyOnQueue:dispatch_get_main_queue() usingBlock:^ {
+        if (!weakThis)
+            return;
+
         [m_sampleBufferDisplayLayer stopRequestingMediaData];
 
         while (!m_pendingVideoSampleQueue.isEmpty()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to