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.
This commit is contained in:
Dudemanguy 2023-09-17 19:45:21 -05:00
parent 2016e902e1
commit ae335ef155
2 changed files with 2 additions and 3 deletions

View File

@ -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);

View File

@ -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;
}