From f99381df818bb05f38d79fe2e6907bdd2029a35a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 28 Sep 2022 17:59:18 -0500 Subject: [PATCH] Only enable RFI at resolutions at or below 1080p due to bugs --- Limelight/Stream/Connection.m | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Limelight/Stream/Connection.m b/Limelight/Stream/Connection.m index b50e852..e79195f 100644 --- a/Limelight/Stream/Connection.m +++ b/Limelight/Stream/Connection.m @@ -436,15 +436,17 @@ void ClSetHdrMode(bool enabled) _drCallbacks.start = DrStart; _drCallbacks.stop = DrStop; + _drCallbacks.capabilities = CAPABILITY_PULL_RENDERER; + +#if !TARGET_OS_TV // RFI doesn't work properly with HEVC on iOS 11 with an iPhone SE (at least) // It doesnt work on macOS either, tested with Network Link Conditioner. // RFI seems to be broken at all resolutions on the Apple TV 4K (1st gen) - // on tvOS 14.5. - _drCallbacks.capabilities = -#if !TARGET_OS_TV - CAPABILITY_REFERENCE_FRAME_INVALIDATION_AVC | + // on tvOS 14.5 and above resolutions around 1080p on recent GFE versions. + if (config.width * config.height <= 1920 * 1080) { + _drCallbacks.capabilities |= CAPABILITY_REFERENCE_FRAME_INVALIDATION_AVC; + } #endif - CAPABILITY_PULL_RENDERER; LiInitializeAudioCallbacks(&_arCallbacks); _arCallbacks.init = ArInit;