summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-04-24 20:21:48 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-04-25 22:48:10 +0300
commit859e956523ceb05790fcdc772544d885c64e863c (patch)
tree7508a07d790634445e12a49bdc5c68f996c6b0fe /mplayer.c
parenta2133d76847dd4c7a19d6826cd9a6562bedfdbc4 (diff)
downloadmpv-859e956523ceb05790fcdc772544d885c64e863c.tar.bz2
mpv-859e956523ceb05790fcdc772544d885c64e863c.tar.xz
Fix -chapter with ordered chapters
Move the code doing an initial seek specified by -chapter to a position where it works if ordered chapters are used.
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mplayer.c b/mplayer.c
index 0432670a99..f5544b8e57 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3716,12 +3716,6 @@ if(!mpctx->demuxer)
mpctx->num_sources = 1;
}
-if(opts->chapterrange[0]>1) {
- double pts;
- if (seek_chapter(mpctx, opts->chapterrange[0]-1, &pts, NULL) >= 0 && pts > -1.0)
- seek(mpctx, pts, SEEK_ABSOLUTE);
-}
-
mpctx->initialized_flags|=INITIALIZED_DEMUXER;
if (mpctx->stream->type != STREAMTYPE_DVD && mpctx->stream->type != STREAMTYPE_DVDNAV) {
@@ -4064,6 +4058,12 @@ if (seek_to_sec || mpctx->timeline) {
seek(mpctx, seek_to_sec, SEEK_ABSOLUTE);
end_at.pos += seek_to_sec;
}
+if (opts->chapterrange[0] > 1) {
+ double pts;
+ if (seek_chapter(mpctx, opts->chapterrange[0]-1, &pts, NULL) >= 0
+ && pts > -1.0)
+ seek(mpctx, pts, SEEK_ABSOLUTE);
+}
if (end_at.type == END_AT_SIZE) {
mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "Option -endpos in MPlayer does not yet support size units.\n");