diff options
author | wm4 <wm4@nowhere> | 2014-12-09 17:46:35 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-09 17:59:04 +0100 |
commit | d38bc531cc7ce9c90b74145e2be2e24cb48e501a (patch) | |
tree | 0c53c6e9199794c5c5f3e1509abae1750a77759e /video/out/vo.c | |
parent | 349d19dda9f7fe486c9521c04023528c7aa71998 (diff) | |
download | mpv-d38bc531cc7ce9c90b74145e2be2e24cb48e501a.tar.bz2 mpv-d38bc531cc7ce9c90b74145e2be2e24cb48e501a.tar.xz |
vo: include normal render-ahead time in flip_queue_offset
A small refactor; shouldn't change any behavior.
Do this so immediate display can be achieved.
Diffstat (limited to 'video/out/vo.c')
-rw-r--r-- | video/out/vo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index 7e2bcfb83e..518841007f 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -228,6 +228,7 @@ static struct vo *vo_create(struct mpv_global *global, talloc_steal(vo, log); *vo->in = (struct vo_internal) { .dispatch = mp_dispatch_create(vo), + .flip_queue_offset = VO_DEFAULT_FLIP_QUEUE_OFFSET, }; mp_make_wakeup_pipe(vo->in->wakeup_pipe); mp_dispatch_set_wakeup_fn(vo->in->dispatch, dispatch_wakeup_cb, vo); @@ -481,8 +482,8 @@ bool vo_is_ready_for_frame(struct vo *vo, int64_t next_pts) if (r) { // Don't show the frame too early - it would basically freeze the // display by disallowing OSD redrawing or VO interaction. - // Actually render the frame at earliest 50ms before target time. - next_pts -= 0.050 * 1e6; + // Actually render the frame at earliest 50ms before target time + // (flip_queue_offset is usually VO_DEFAULT_FLIP_QUEUE_OFFSET, 50ms). next_pts -= in->flip_queue_offset; int64_t now = mp_time_us(); if (next_pts > now) |