fix(mpv): avoid forcing HDR colorspace hint

This commit is contained in:
edde746
2026-05-21 16:01:15 +02:00
parent 9dc3a1a1b1
commit 6a74ff083f
2 changed files with 6 additions and 6 deletions
@@ -417,7 +417,7 @@ class MpvPlayerCoreBase: NSObject {
setRawStringPropertyAsync(
"target-colorspace-hint",
value: enabled ? "yes" : "no",
value: enabled ? "auto" : "no",
completion: completion ?? { _ in }
)
@@ -596,7 +596,7 @@ class MpvPlayerCoreBase: NSObject {
#endif
checkError(mpv_set_option_string(mpv, "hwdec-codecs", "all"))
checkError(mpv_set_option_string(mpv, "hwdec-software-fallback", "yes"))
checkError(mpv_set_option_string(mpv, "target-colorspace-hint", "yes"))
checkError(mpv_set_option_string(mpv, "target-colorspace-hint", "auto"))
}
#if os(macOS)
+4 -4
View File
@@ -45,8 +45,8 @@ bool MpvPlayer::Initialize(HWND container, HWND flutter_window) {
mpv_set_option_string(mpv_, "input-vo-keyboard", "no");
mpv_set_option_string(mpv_, "osc", "no");
// HDR passthrough - let mpv handle color space
mpv_set_option_string(mpv_, "target-colorspace-hint", "yes");
// Let mpv use display/context detection instead of forcing HDR signaling.
mpv_set_option_string(mpv_, "target-colorspace-hint", "auto");
// Fallback tone mapping when display doesn't support HDR
mpv_set_option_string(mpv_, "tone-mapping", "auto");
@@ -506,7 +506,7 @@ void MpvPlayer::SetHDREnabled(bool enabled, StatusCallback callback) {
hdr_enabled_ = enabled;
if (mpv_) {
SetPropertyAsync("target-colorspace-hint", enabled ? "yes" : "no", std::move(callback));
SetPropertyAsync("target-colorspace-hint", enabled ? "auto" : "no", std::move(callback));
} else if (callback) {
callback(0);
}
@@ -516,7 +516,7 @@ void MpvPlayer::SetHDREnabled(bool enabled, StatusCallback callback) {
void MpvPlayer::UpdateHDRMode(double sigPeak) {
// On Windows, mpv handles HDR passthrough automatically when:
// - target-colorspace-hint=yes
// - target-colorspace-hint=auto
// - Windows HDR is enabled in Display Settings
// - Display supports HDR
// No explicit DXGI calls needed - mpv's gpu-next/vulkan handles it