diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-10-06 22:55:02 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-07 17:50:50 +0000 |
commit | ef11d31c3acfd71307a94e44ad164a4861287675 (patch) | |
tree | 08f3e1b7908143c54fb767dfe82055b14db530c5 | |
parent | 44c398c3e133379e01f06c89fd78b6692694849c (diff) | |
download | mpv-ef11d31c3acfd71307a94e44ad164a4861287675.tar.bz2 mpv-ef11d31c3acfd71307a94e44ad164a4861287675.tar.xz |
vo: remove frame timing check from vo_still_displaying()
This timing dependency does not guarantee that we will wake up in the
future, depending on processing times.
-rw-r--r-- | video/out/vo.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index 0130ae4387..669595f1ce 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -1182,16 +1182,9 @@ void vo_seek_reset(struct vo *vo) bool vo_still_displaying(struct vo *vo) { struct vo_internal *in = vo->in; - pthread_mutex_lock(&vo->in->lock); - int64_t now = mp_time_us(); - int64_t frame_end = 0; - if (in->current_frame) { - frame_end = in->current_frame->pts + MPMAX(in->current_frame->duration, 0); - if (in->current_frame->display_synced) - frame_end = in->current_frame->num_vsyncs > 0 ? INT64_MAX : 0; - } - bool working = now < frame_end || in->rendering || in->frame_queued; - pthread_mutex_unlock(&vo->in->lock); + pthread_mutex_lock(&in->lock); + bool working = in->rendering || in->frame_queued; + pthread_mutex_unlock(&in->lock); return working && in->hasframe; } |