diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-11-13 22:17:40 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-11-18 22:54:29 +0000 |
commit | faed191397c8a91be33d102fa6ec9d9108820bba (patch) | |
tree | 4433c79040f0c27402c7b8edbb6278b03eec3536 /video | |
parent | 88fc9475523dc40766b04cba9bd4b5251702ded3 (diff) | |
download | mpv-faed191397c8a91be33d102fa6ec9d9108820bba.tar.bz2 mpv-faed191397c8a91be33d102fa6ec9d9108820bba.tar.xz |
vo_gpu_next: fix pl_queue refill on reset
On reset, we would ignore all the frames that were seen before. This is
incorrect and would drop valid frames that should be rendered.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_gpu_next.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index af1ff79d72..f8d311678c 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -883,17 +883,19 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) // Push all incoming frames into the frame queue for (int n = 0; n < frame->num_frames; n++) { int id = frame->frame_id + n; - if (id <= p->last_id) - continue; // ignore already seen frames if (p->want_reset) { can_interpolate = false; pl_renderer_flush_cache(p->rr); pl_queue_reset(p->queue); p->last_pts = 0.0; + p->last_id = 0; p->want_reset = false; } + if (id <= p->last_id) + continue; // ignore already seen frames + struct mp_image *mpi = mp_image_new_ref(frame->frames[n]); struct frame_priv *fp = talloc_zero(mpi, struct frame_priv); mpi->priv = fp; |