summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--player/loadfile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index b6027de0ca..872db20399 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -802,8 +802,6 @@ static void open_demux_thread(void *pctx)
args->err = MPV_ERROR_LOADING_FAILED;
}
}
- if (args->demux && global->opts->rebase_start_time)
- demux_set_ts_offset(args->demux, -args->demux->start_time);
}
static void open_demux_reentrant(struct MPContext *mpctx)
@@ -820,7 +818,6 @@ static void open_demux_reentrant(struct MPContext *mpctx)
mpctx_run_reentrant(mpctx, open_demux_thread, &args);
if (args.demux) {
mpctx->demuxer = args.demux;
- enable_demux_thread(mpctx, mpctx->demuxer);
} else {
mpctx->error_playing = args.err;
}
@@ -1038,6 +1035,10 @@ reopen_file:
goto terminate_playback;
}
+ if (mpctx->opts->rebase_start_time)
+ demux_set_ts_offset(mpctx->demuxer, -mpctx->demuxer->start_time);
+ enable_demux_thread(mpctx, mpctx->demuxer);
+
load_chapters(mpctx);
add_demuxer_tracks(mpctx, mpctx->demuxer);