From 1e91750c73e1a35e93d4aa37c2ab85ccd3ce13d9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 26 Jul 2015 20:56:37 +0200 Subject: video: always decode at least 2 frames in advance Remove the exception for decoding only 1 frame if VO framedrop is disabled. This was originally done to be able to test potential regressions when we enabled VO framedrop and decoding 2 frames by default. It's not needed anymore. --- player/video.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'player/video.c') 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. -- cgit v1.2.3