summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c
index 431eb73d6e..77b6fb9a6d 100644
--- a/player/video.c
+++ b/player/video.c
@@ -596,7 +596,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;
}