mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
e6f543ebec
commit
09d873d5d4
|
@ -1322,15 +1322,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, true);
|
||||
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, true);
|
||||
startpos = mpctx->resolve_result->start_time;
|
||||
if (startpos == -1 && mpctx->timeline)
|
||||
startpos = 0;
|
||||
if (startpos != -1) {
|
||||
queue_seek(mpctx, MPSEEK_ABSOLUTE, startpos, 0, true);
|
||||
execute_queued_seek(mpctx);
|
||||
}
|
||||
if (opts->chapterrange[0] > 0) {
|
||||
|
|
Loading…
Reference in New Issue