mirror of https://github.com/mpv-player/mpv
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:
parent
2016e902e1
commit
ae335ef155
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue