mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 10:25:02 +00:00
Trim comments and hoist settings read in stream filtering
Drop comments restating what the code shows; hoist allowSoftwareDecodedFormats out of the recommendedVideoStreams filter closure so the bridge property is read once per render instead of once per stream.
This commit is contained in:
@@ -1907,11 +1907,9 @@ final class PlayerService {
|
||||
}
|
||||
|
||||
// Filter out codecs with priority 0 (software decode) if hardware options exist,
|
||||
// unless the user opted in to software-decoded formats (e.g. to unlock 4K VP9/AV1
|
||||
// on Apple TV models without hardware decoders for those codecs).
|
||||
let allowSoftware = settingsManager?.allowSoftwareDecodedFormats ?? false
|
||||
// unless the user opted in to software-decoded formats.
|
||||
let streamsToConsider: [Stream]
|
||||
if allowSoftware {
|
||||
if settingsManager?.allowSoftwareDecodedFormats ?? false {
|
||||
streamsToConsider = filteredVideoStreams
|
||||
} else {
|
||||
let hardwareDecodableStreams = filteredVideoStreams.filter { videoCodecPriority($0.videoCodec) > 0 }
|
||||
|
||||
Reference in New Issue
Block a user