- notification lifecycle fixes - replace some notifications with delegates

- fix osw profile switch issue
This commit is contained in:
TrueZhuanjia
2025-06-22 21:25:29 +08:00
parent cd6e08956c
commit 6bc142a07b
12 changed files with 89 additions and 96 deletions
+3 -2
View File
@@ -79,6 +79,7 @@ extern int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size,
- (id)initWithView:(StreamView*)view callbacks:(id<ConnectionCallbacks>)callbacks streamAspectRatio:(float)aspectRatio useFramePacing:(BOOL)useFramePacing
{
NSLog(@"initializing video decoder %f", CACurrentMediaTime());
self = [super init];
_view = view;
@@ -145,8 +146,8 @@ int DrSubmitDecodeUnit(PDECODE_UNIT decodeUnit);
}
}
- (void)stop
{
- (void)stop{
[[NSNotificationCenter defaultCenter] removeObserver:self];
[_displayLink invalidate];
}