mirror of https://github.com/mpv-player/mpv
vo: refine wakeup condition, and wake up more in audio sync mode
Commit 6a13954d67
lowered the frequency of wakeups with this
condition. But it seems it sometimes the audio sync mode really should
get the wakeup before the frame is rendered. Normally, vo_thread is
supposed to perform this wakeup. Now the wakeup frequency is twice of
what should be needed - whatever, maybe it can be fixed properly once or
if timing is moved to the VO entirely in the future.
Fixes: #7777 (probably, untested)
This commit is contained in:
parent
d27ad96542
commit
5746258018
|
@ -939,9 +939,9 @@ static bool render_frame(struct vo *vo)
|
|||
in->hasframe_rendered = true;
|
||||
int64_t prev_drop_count = vo->in->drop_count;
|
||||
// Can the core queue new video now? Non-display-sync uses a separate
|
||||
// timer instead.
|
||||
bool can_queue =
|
||||
!in->frame_queued && in->current_frame->num_vsyncs < 1 && use_vsync;
|
||||
// timer instead, but possibly benefits from preparing a frame early.
|
||||
bool can_queue = !in->frame_queued &&
|
||||
(in->current_frame->num_vsyncs < 1 || !use_vsync);
|
||||
pthread_mutex_unlock(&in->lock);
|
||||
|
||||
if (can_queue)
|
||||
|
|
Loading…
Reference in New Issue