mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 10:31:02 +00:00
Fix crash during display layer reinitialization
This commit is contained in:
@@ -311,13 +311,9 @@ int DrSubmitDecodeUnit(PDECODE_UNIT decodeUnit);
|
||||
if (displayLayer.status == AVQueuedSampleBufferRenderingStatusFailed) {
|
||||
Log(LOG_E, @"Display layer rendering failed: %@", displayLayer.error);
|
||||
|
||||
// Recreate the display layer on the main thread.
|
||||
// We need to use dispatch_sync() or we may miss
|
||||
// some parameter sets while the layer is being
|
||||
// recreated.
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
[self reinitializeDisplayLayer];
|
||||
});
|
||||
// Recreate the display layer. We are already on the main thread,
|
||||
// so this is safe to do right here.
|
||||
[self reinitializeDisplayLayer];
|
||||
|
||||
// Request an IDR frame to initialize the new decoder
|
||||
free(data);
|
||||
|
||||
Reference in New Issue
Block a user