fix(player): preserve default codec preferences after upgrade (#2444)

* fix(player): preserve default codec preferences after upgrade

* update

---------

Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
Starfallen
2026-07-11 08:15:08 +08:00
committed by GitHub
parent 90eee40f92
commit cae5befa63
2 changed files with 9 additions and 13 deletions

View File

@@ -267,10 +267,10 @@ abstract final class Pref {
}
final codecs = _setting.get(SettingBoxKey.preferCodecs);
if (codecs is List && codecs.isNotEmpty) {
if (codecs is List) {
return codecs.map((i) => VideoDecodeFormatType.values.byName(i)).toList();
}
return const [];
return const <VideoDecodeFormatType>[.AVC, .AV1];
}
static String get hardwareDecoding => _setting.get(