diff options
author | wm4 <wm4@nowhere> | 2015-03-13 13:14:11 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-13 13:14:11 +0100 |
commit | 6de3fe0b342a3da4216f090698c83d0970a53566 (patch) | |
tree | 36889c80227f46decf3fa55a14093b55fdd7af18 /player | |
parent | a38b85ce42408e740b24eeb51ada726d35c43b89 (diff) | |
download | mpv-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.c | 6 |
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, |