diff options
author | wm4 <wm4@nowhere> | 2012-08-07 03:00:06 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-07 03:01:44 +0200 |
commit | b27bc9e3c9adca3fad0f35a6f6f0480b69e013f7 (patch) | |
tree | 51049758bf97660033c30ad6629924ac8afb0ea0 | |
parent | 477af1c777116fcfb96885195acbed5cca8a0d4c (diff) |
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.)
-rw-r--r-- | command.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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")); |