crash fixes

This commit is contained in:
True Zhuanjia
2026-02-11 15:00:23 +08:00
parent 1d33feec8b
commit 8ec8f32935
2 changed files with 15 additions and 14 deletions
+14 -13
View File
@@ -441,21 +441,22 @@ int DrSubmitDecodeUnit(PDECODE_UNIT decodeUnit);
[[NSNotificationCenter defaultCenter] removeObserver:self];
[_displayLink invalidate];
}
- (void)cleanup
{
[_frameQueue stop];
if (_renderingBackend == RENDER_AVSB) {
[_displayLink invalidate];
}
@synchronized(self) {
if (_decompressionSession != NULL) {
VTDecompressionSessionInvalidate(_decompressionSession);
CFRelease(_decompressionSession);
_decompressionSession = nil;
- (void)cleanup{
dispatch_async(dispatch_get_main_queue(), ^{
[self->_frameQueue stop];
if (self->_renderingBackend == RENDER_AVSB) {
[self->_displayLink invalidate];
}
}
@synchronized(self) {
if (self->_decompressionSession != NULL) {
VTDecompressionSessionInvalidate(self->_decompressionSession);
CFRelease(self->_decompressionSession);
self->_decompressionSession = nil;
}
}
});
}
#define NALU_START_PREFIX_SIZE 3
@@ -1689,7 +1689,7 @@ BOOL isCustomResolution(int resolutionSelected) {
[_favoriteSettingStackIdentifiers removeAllObjects];
//for(NSInteger i = 0; i < parentStack.arrangedSubviews.count; i++){
for(NSInteger i = 0; i < _parentStack.arrangedSubviews.count; i++){
[_favoriteSettingStackIdentifiers addObject:_parentStack.arrangedSubviews[i].accessibilityIdentifier];
if(_parentStack.arrangedSubviews[i].accessibilityIdentifier) [_favoriteSettingStackIdentifiers addObject:_parentStack.arrangedSubviews[i].accessibilityIdentifier];
}
}
[[NSUserDefaults standardUserDefaults] setObject:_favoriteSettingStackIdentifiers forKey:@"FavoriteSettingStackIdentifiers"];