diff options
author | wm4 <wm4@nowhere> | 2015-07-26 20:56:37 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-07-26 21:44:57 +0200 |
commit | 1e91750c73e1a35e93d4aa37c2ab85ccd3ce13d9 (patch) | |
tree | 489bf715b442d9a014431c7755019924a93aaeb5 | |
parent | 77a9265561a174682bb41b3f7850ef49a630740b (diff) |
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.
-rw-r--r-- | player/video.c | 6 |
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. |