summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
Diffstat (limited to 'player')
-rw-r--r--player/core.h2
-rw-r--r--player/video.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/player/core.h b/player/core.h
index 80cf7178dd..c2fe74cb6b 100644
--- a/player/core.h
+++ b/player/core.h
@@ -229,7 +229,7 @@ typedef struct MPContext {
struct vo *video_out;
// next_frame[0] is the next frame, next_frame[1] the one after that.
- struct mp_image *next_frames[2 + VO_MAX_FUTURE_FRAMES];
+ struct mp_image *next_frames[VO_MAX_REQ_FRAMES];
int num_next_frames;
struct mp_image *saved_frame; // for hrseek_lastframe
diff --git a/player/video.c b/player/video.c
index 6de89fc31e..57ec9d64d1 100644
--- a/player/video.c
+++ b/player/video.c
@@ -604,10 +604,10 @@ static int get_req_frames(struct MPContext *mpctx, bool eof)
if (eof || mpctx->video_pts == MP_NOPTS_VALUE)
return 1;
- int req = 1 + vo_get_num_future_frames(mpctx->video_out);
+ int req = vo_get_num_req_frames(mpctx->video_out);
if (opts->frame_dropping & 1)
req = MPMAX(req, 2);
- return req;
+ return MPMIN(req, MP_ARRAY_SIZE(mpctx->next_frames));
}
// Whether it's fine to call add_new_frame() now.