summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-09-17 19:45:21 -0500
committerDudemanguy <random342@airmail.cc>2023-10-10 19:10:55 +0000
commitae335ef155d03c9d65914499e2dc2baca71d0381 (patch)
treed035c9bda5fbf9ecb90af20f270be13b9459ac5d
parent2016e902e19d8b48a8aa4a69c06fe58f3d31916f (diff)
downloadmpv-ae335ef155d03c9d65914499e2dc2baca71d0381.tar.bz2
mpv-ae335ef155d03c9d65914499e2dc2baca71d0381.tar.xz
vo: remove vo_get_estimated_vsync_interval conversion to seconds
This is weird. The caller should be responsible for converting the value if desired. Move the conversion to player/command.c instead.
-rw-r--r--player/command.c2
-rw-r--r--video/out/vo.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/player/command.c b/player/command.c
index 8d7bc39c11..a5aa087856 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2491,7 +2491,7 @@ static int mp_property_estimated_display_fps(void *ctx, struct m_property *prop,
struct vo *vo = mpctx->video_out;
if (!vo)
return M_PROPERTY_UNAVAILABLE;
- double interval = vo_get_estimated_vsync_interval(vo);
+ double interval = vo_get_estimated_vsync_interval(vo) / 1e9;
if (interval <= 0)
return M_PROPERTY_UNAVAILABLE;
return m_property_double_ro(action, arg, 1.0 / interval);
diff --git a/video/out/vo.c b/video/out/vo.c
index 669595f1ce..496f01f45e 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -1261,12 +1261,11 @@ double vo_get_vsync_interval(struct vo *vo)
return res;
}
-// Returns duration of a display refresh in seconds.
double vo_get_estimated_vsync_interval(struct vo *vo)
{
struct vo_internal *in = vo->in;
pthread_mutex_lock(&in->lock);
- double res = in->estimated_vsync_interval / 1e9;
+ double res = in->estimated_vsync_interval;
pthread_mutex_unlock(&in->lock);
return res;
}