summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2019-12-06 17:08:07 +0100
committersfan5 <sfan5@live.de>2019-12-07 16:44:27 +0100
commit83b742df77e9edd0fb2290567097c5d5dc0c2c55 (patch)
tree1e2752fb408ee449d68d785061bfbf4ffc5091f3
parent376e57ee7b8223a77a4c63dc1198bf1a875b4a31 (diff)
downloadmpv-83b742df77e9edd0fb2290567097c5d5dc0c2c55.tar.bz2
mpv-83b742df77e9edd0fb2290567097c5d5dc0c2c55.tar.xz
drm_common: fix display FPS estimation for interlaced modes
-rw-r--r--video/out/drm_common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/out/drm_common.c b/video/out/drm_common.c
index 51134a3c00..9c56227b9e 100644
--- a/video/out/drm_common.c
+++ b/video/out/drm_common.c
@@ -626,7 +626,10 @@ void kms_destroy(struct kms *kms)
static double mode_get_Hz(const drmModeModeInfo *mode)
{
- return mode->clock * 1000.0 / mode->htotal / mode->vtotal;
+ double rate = mode->clock * 1000.0 / mode->htotal / mode->vtotal;
+ if (mode->flags & DRM_MODE_FLAG_INTERLACE)
+ rate *= 2.0;
+ return rate;
}
static void kms_show_available_modes(