Revert crash fix when removing player layer observer
Couldn't figure out how this was happening, so I don't want to hide it with try/catch. Let's get it fixed instead.
This commit is contained in:
parent
80b71b1922
commit
3d40935cc1
@ -732,10 +732,7 @@ static NSString *const timedMetadata = @"timedMetadata";
|
|||||||
- (void)removePlayerLayer
|
- (void)removePlayerLayer
|
||||||
{
|
{
|
||||||
[_playerLayer removeFromSuperlayer];
|
[_playerLayer removeFromSuperlayer];
|
||||||
@try{
|
[_playerLayer removeObserver:self forKeyPath:readyForDisplayKeyPath];
|
||||||
[_playerLayer removeObserver:self forKeyPath:readyForDisplayKeyPath];
|
|
||||||
}@catch (NSException * e) {
|
|
||||||
}
|
|
||||||
_playerLayer = nil;
|
_playerLayer = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -826,10 +823,7 @@ static NSString *const timedMetadata = @"timedMetadata";
|
|||||||
{
|
{
|
||||||
[_player pause];
|
[_player pause];
|
||||||
if (_playbackRateObserverRegistered) {
|
if (_playbackRateObserverRegistered) {
|
||||||
@try{
|
[_player removeObserver:self forKeyPath:playbackRate context:nil];
|
||||||
[_player removeObserver:self forKeyPath:playbackRate context:nil];
|
|
||||||
}@catch (NSException * e) {
|
|
||||||
}
|
|
||||||
_playbackRateObserverRegistered = NO;
|
_playbackRateObserverRegistered = NO;
|
||||||
}
|
}
|
||||||
_player = nil;
|
_player = nil;
|
||||||
|
Loading…
Reference in New Issue
Block a user