summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-19 00:14:40 +0100
committerwm4 <wm4@nowhere>2014-03-11 00:13:39 +0100
commit712657a89432adfa393f3159d70045ed7bf69162 (patch)
treee3bc29c704ffeecb9f5d5035d8c63c04ce79b3c7
parent496956de3da6aa9599fd29853b8ea271a86bf6ca (diff)
downloadmpv-712657a89432adfa393f3159d70045ed7bf69162.tar.bz2
mpv-712657a89432adfa393f3159d70045ed7bf69162.tar.xz
player: fix start time if timeline is used (ordered chapters, EDL)
When timeline was used, and the --start option was not used, the initial seek (needed to switch to the first timeline segment) seeked to -1 due to an oversight. Conflicts: player/loadfile.c
-rw-r--r--player/loadfile.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 0b15d8752e..adf708858c 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1307,14 +1307,13 @@ goto_reopen_demuxer: ;
// If there's a timeline force an absolute seek to initialize state
double startpos = rel_time_to_abs(mpctx, opts->play_start, -1);
- if (startpos != -1 || mpctx->timeline) {
- queue_seek(mpctx, MPSEEK_ABSOLUTE, startpos, 0);
- execute_queued_seek(mpctx);
- }
if (startpos == -1 && mpctx->resolve_result &&
mpctx->resolve_result->start_time > 0)
- {
- queue_seek(mpctx, MPSEEK_ABSOLUTE, mpctx->resolve_result->start_time, 0);
+ startpos = mpctx->resolve_result->start_time;
+ if (startpos == -1 && mpctx->timeline)
+ startpos = 0;
+ if (startpos != -1) {
+ queue_seek(mpctx, MPSEEK_ABSOLUTE, startpos, 0);
execute_queued_seek(mpctx);
}
if (opts->chapterrange[0] > 0) {