summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-13 13:14:11 +0100
committerwm4 <wm4@nowhere>2015-03-13 13:14:11 +0100
commit6de3fe0b342a3da4216f090698c83d0970a53566 (patch)
tree36889c80227f46decf3fa55a14093b55fdd7af18 /player
parenta38b85ce42408e740b24eeb51ada726d35c43b89 (diff)
downloadmpv-6de3fe0b342a3da4216f090698c83d0970a53566.tar.bz2
mpv-6de3fe0b342a3da4216f090698c83d0970a53566.tar.xz
command: fix display-fps property (again)
This caused complaints because the fps was basically rounded on microsecond boundaries in the vsync interval (it seemed convenient to store only the vsync interval). So store the fps as float too, and let the "display-fps" property return it directly.
Diffstat (limited to 'player')
-rw-r--r--player/command.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/player/command.c b/player/command.c
index 6fb0ea66d4..3c190cef73 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2608,11 +2608,11 @@ static int mp_property_display_fps(void *ctx, struct m_property *prop,
if (!vo)
return M_PROPERTY_UNAVAILABLE;
- int64_t interval = vo_get_vsync_interval(vo);
- if (interval <= 1)
+ double fps = vo_get_display_fps(vo);
+ if (fps < 1)
return M_PROPERTY_UNAVAILABLE;
- return m_property_double_ro(action, arg, 1e6 / interval);
+ return m_property_double_ro(action, arg, fps);
}
static int mp_property_display_names(void *ctx, struct m_property *prop,