summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-26 20:56:37 +0200
committerwm4 <wm4@nowhere>2015-07-26 21:44:57 +0200
commit1e91750c73e1a35e93d4aa37c2ab85ccd3ce13d9 (patch)
tree489bf715b442d9a014431c7755019924a93aaeb5 /player
parent77a9265561a174682bb41b3f7850ef49a630740b (diff)
downloadmpv-1e91750c73e1a35e93d4aa37c2ab85ccd3ce13d9.tar.bz2
mpv-1e91750c73e1a35e93d4aa37c2ab85ccd3ce13d9.tar.xz
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.
Diffstat (limited to 'player')
-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.