Title: [219266] trunk/Source/WebCore
Revision
219266
Author
[email protected]
Date
2017-07-07 13:24:35 -0700 (Fri, 07 Jul 2017)

Log Message

AVPlayer can continue to be active after released by MediaPlayerPrivateAVFoundationObjC.
https://bugs.webkit.org/show_bug.cgi?id=174264

Reviewed by Eric Carlson.

If the AVPlayer is retained (by an autorelease pool, or internally by other objects in
AVFoundation), releasing the AVPlayer is not enough to cancel loading or playback. So before
releasing the AVPlayer, make sure to disassociate the current AVPlayerItem, which should
cancel all activity in the AVPlayer.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (219265 => 219266)


--- trunk/Source/WebCore/ChangeLog	2017-07-07 20:20:24 UTC (rev 219265)
+++ trunk/Source/WebCore/ChangeLog	2017-07-07 20:24:35 UTC (rev 219266)
@@ -1,3 +1,18 @@
+2017-07-07  Jer Noble  <[email protected]>
+
+        AVPlayer can continue to be active after released by MediaPlayerPrivateAVFoundationObjC.
+        https://bugs.webkit.org/show_bug.cgi?id=174264
+
+        Reviewed by Eric Carlson.
+
+        If the AVPlayer is retained (by an autorelease pool, or internally by other objects in
+        AVFoundation), releasing the AVPlayer is not enough to cancel loading or playback. So before
+        releasing the AVPlayer, make sure to disassociate the current AVPlayerItem, which should
+        cancel all activity in the AVPlayer.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
+
 2017-07-07  Basuke Suzuki  <[email protected]>
 
         [Curl] Remove data url handler for async load

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (219265 => 219266)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2017-07-07 20:20:24 UTC (rev 219265)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2017-07-07 20:24:35 UTC (rev 219266)
@@ -629,6 +629,8 @@
 
         for (NSString *keyName in playerKVOProperties())
             [m_avPlayer.get() removeObserver:m_objcObserver.get() forKeyPath:keyName];
+
+        [m_avPlayer replaceCurrentItemWithPlayerItem:nil];
         m_avPlayer = nil;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to