summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/player/video.c b/player/video.c
index 763f2e5a81..4831189dff 100644
--- a/player/video.c
+++ b/player/video.c
@@ -600,17 +600,13 @@ static void shift_frames(struct MPContext *mpctx)
static int get_req_frames(struct MPContext *mpctx, bool eof)
{
- struct MPOpts *opts = mpctx->opts;
-
// On EOF, drain all frames.
// On the first frame, output a new frame as quickly as possible.
if (eof || mpctx->video_pts == MP_NOPTS_VALUE)
return 1;
int req = vo_get_num_req_frames(mpctx->video_out);
- if (opts->frame_dropping & 1)
- req = MPMAX(req, 2);
- return MPMIN(req, MP_ARRAY_SIZE(mpctx->next_frames));
+ return MPCLAMP(req, 2, MP_ARRAY_SIZE(mpctx->next_frames));
}
// Whether it's fine to call add_new_frame() now.