From b27bc9e3c9adca3fad0f35a6f6f0480b69e013f7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 7 Aug 2012 03:00:06 +0200 Subject: command: skipping past the last chapter explicitly stops playback Skipping past the last chapter as user action means playback of the current file should be ended. The code did this by doing a relative seek by 1000000000 seconds, which usually caused playback to stop. However, it displayed a quite ugly and arbitrary looking number in the status display. Fix this by explicitly skipping to the next file, instead of issuing a seek command. (If there is no next file, the player will exit, just as before.) (Note: an alternative way to solve this could have been comparing the mpctx->video_pts with the mpctx->last_seek_pts in print_status(). If they're the same, it's likely that the video_pts was set to the seek request time, and we could print another PTS or no PTS instead.) --- command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command.c b/command.c index 22c539b5b1..d9cd83a862 100644 --- a/command.c +++ b/command.c @@ -545,7 +545,7 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg, set_osd_tmsg(mpctx, OSD_MSG_TEXT, 1, opts->osd_duration, "Chapter: %s", chapter_name); } else if (step_all > 0) - queue_seek(mpctx, MPSEEK_RELATIVE, 1000000000, 0); + mpctx->stop_play = PT_NEXT_ENTRY; else set_osd_tmsg(mpctx, OSD_MSG_TEXT, 1, opts->osd_duration, "Chapter: (%d) %s", 0, mp_gtext("unknown")); -- cgit v1.2.3