diff options
author | wm4 <wm4@nowhere> | 2014-10-14 13:29:38 +0200 |
---|---|---|
committer | Alessandro Ghedini <alessandro@ghedini.me> | 2014-10-15 15:15:58 +0200 |
commit | f2e289dc8062a52b3dd3070f2a24b1418d57a117 (patch) | |
tree | 43d50bbefe26a4ff33031ff4a381dfeb23648133 /player/video.c | |
parent | 4a0e50d2a6286489014c90d3bd98d9bdb8cbeff0 (diff) | |
download | mpv-f2e289dc8062a52b3dd3070f2a24b1418d57a117.tar.bz2 mpv-f2e289dc8062a52b3dd3070f2a24b1418d57a117.tar.xz |
player: fix --frames
This could produce an extra frame, because reaching the maximum merely
signals the playloop to exit, without strictly enforcing the limit.
Fixes #1181.
CC: @mpv-player/stable
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c index 3576ff0bc8..27655fc38a 100644 --- a/player/video.c +++ b/player/video.c @@ -579,7 +579,9 @@ static int video_output_image(struct MPContext *mpctx, double endpts) && mpctx->video_status == STATUS_SYNCING; if (hrseek && img->pts < mpctx->hrseek_pts - .005) drop = true; - if (endpts != MP_NOPTS_VALUE && img->pts >= endpts) { + if ((endpts != MP_NOPTS_VALUE && img->pts >= endpts) || + mpctx->max_frames == 0) + { drop = true; r = VD_EOF; } |