Merge pull request #833 from blennster/main

Fix uneven playback when using MPV and not syncing refreshrate
This commit is contained in:
Arkadiusz Fal 2024-11-08 15:03:51 +01:00 committed by GitHub
commit c7e1a50e56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,6 +80,7 @@ final class MPVClient: ObservableObject {
checkError(mpv_set_option_string(mpv, "initial-audio-sync", Defaults[.mpvInitialAudioSync] ? "yes" : "no"))
// Enable VSYNC needed for `video-sync`
if Defaults[.mpvSetRefreshToContentFPS] {
checkError(mpv_set_option_string(mpv, "opengl-swapinterval", "1"))
checkError(mpv_set_option_string(mpv, "video-sync", "display-resample"))
checkError(mpv_set_option_string(mpv, "interpolation", "yes"))
@ -87,6 +88,7 @@ final class MPVClient: ObservableObject {
checkError(mpv_set_option_string(mpv, "tscale-window", "blackman"))
checkError(mpv_set_option_string(mpv, "vd-lavc-framedrop", "nonref"))
checkError(mpv_set_option_string(mpv, "display-fps-override", "\(String(getScreenRefreshRate()))"))
}
// CPU //