Changeset 219266 in webkit


Ignore:
Timestamp:
Jul 7, 2017 1:24:35 PM (7 years ago)
Author:
jer.noble@apple.com
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r219265 r219266  
     12017-07-07  Jer Noble  <jer.noble@apple.com>
     2
     3        AVPlayer can continue to be active after released by MediaPlayerPrivateAVFoundationObjC.
     4        https://bugs.webkit.org/show_bug.cgi?id=174264
     5
     6        Reviewed by Eric Carlson.
     7
     8        If the AVPlayer is retained (by an autorelease pool, or internally by other objects in
     9        AVFoundation), releasing the AVPlayer is not enough to cancel loading or playback. So before
     10        releasing the AVPlayer, make sure to disassociate the current AVPlayerItem, which should
     11        cancel all activity in the AVPlayer.
     12
     13        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     14        (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
     15
    1162017-07-07  Basuke Suzuki  <Basuke.Suzuki@sony.com>
    217
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r219237 r219266  
    630630        for (NSString *keyName in playerKVOProperties())
    631631            [m_avPlayer.get() removeObserver:m_objcObserver.get() forKeyPath:keyName];
     632
     633        [m_avPlayer replaceCurrentItemWithPlayerItem:nil];
    632634        m_avPlayer = nil;
    633635    }
Note: See TracChangeset for help on using the changeset viewer.