0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

drm_common: fix display FPS estimation for interlaced modes

This commit is contained in:
sfan5 2019-12-06 17:08:07 +01:00
parent 376e57ee7b
commit 83b742df77

View File

@ -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(