mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 09:02:38 +00:00
player: move some minor demuxer setup code
In particular, move demux_set_ts_offset() out of the loader thread. There's no discernible reason for that, probably.
This commit is contained in:
parent
e7d902bdc0
commit
04858c0b83
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user