diff --git a/shared/apple/MpvPlayer/MpvPlayerCoreBase.swift b/shared/apple/MpvPlayer/MpvPlayerCoreBase.swift index 0a6439c3..d7cb401c 100644 --- a/shared/apple/MpvPlayer/MpvPlayerCoreBase.swift +++ b/shared/apple/MpvPlayer/MpvPlayerCoreBase.swift @@ -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) diff --git a/windows/runner/mpv/mpv_player.cpp b/windows/runner/mpv/mpv_player.cpp index f9572b2b..68352e9a 100644 --- a/windows/runner/mpv/mpv_player.cpp +++ b/windows/runner/mpv/mpv_player.cpp @@ -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