Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVPlayerItem was deallocated while key value observers were still registered with it. #185

Open
S-Freedom opened this issue Jun 25, 2021 · 0 comments

Comments

@S-Freedom
Copy link

use RACObserve caused a crash:
creash info:

#56 Thread
NSInternalInconsistencyException

An instance 0x178201b40 of class AVPlayerItem was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x174a3bca0> ( <NSKeyValueObservance 0x1754523c0: Observer: 0x1704342e0, Key path: playbackLikelyToKeepUp, Options: <New: NO, Old: NO, Prior: YES> Context: 0x1758637c0, Property: 0x175e5df70> )

my code:
//缓冲区播放完成
[RACObserve(self.playerItem, playbackBufferEmpty) subscribeNext:^(id _Nullable x) {
@strongify(self);
BOOL empty = [x boolValue];
if (empty) {
//缓冲区为空
[self callBackDelegateStatus:PlayerStatusBuffering];
}
}];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant