player: signal EOF when using --frames

This commit is contained in:
wm4 2014-10-10 15:14:11 +02:00
parent 4758866a18
commit 299bf5c017
2 changed files with 2 additions and 2 deletions

View File

@ -765,7 +765,7 @@ static void handle_sstep(struct MPContext *mpctx)
if (mpctx->video_status >= STATUS_EOF) {
if (mpctx->max_frames >= 0)
mpctx->stop_play = PT_NEXT_ENTRY;
mpctx->stop_play = AT_END_OF_FILE;
if (mpctx->step_frames > 0 && !mpctx->paused)
pause_player(mpctx);
}

View File

@ -823,7 +823,7 @@ void write_video(struct MPContext *mpctx, double endpts)
pause_player(mpctx);
}
if (mpctx->max_frames == 0)
mpctx->stop_play = PT_NEXT_ENTRY;
mpctx->stop_play = AT_END_OF_FILE;
if (mpctx->max_frames > 0)
mpctx->max_frames--;
}