diff options
author | wm4 <wm4@nowhere> | 2016-01-03 15:48:47 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-03 15:48:47 +0100 |
commit | 2c3f4850b828bfbc45d4b3a4091f2ac4b39061a6 (patch) | |
tree | feba6241705ca704a0397a4ad4eeb9021b9e7005 /player | |
parent | 13ade4f1bcbe0b3a8142b7a416e56f3a576d7284 (diff) | |
download | mpv-2c3f4850b828bfbc45d4b3a4091f2ac4b39061a6.tar.bz2 mpv-2c3f4850b828bfbc45d4b3a4091f2ac4b39061a6.tar.xz |
player: make sure streams are selected with ordered chapters
When using --start with timeline/ordered chapters, then the
timeline_switch_to_time() function will look at playback_initialized
whether to rselect the currently selected streams on the demuxer level.
So we need to set this field to true at an earlier stage during
initialization, and in particular before the code for --start is called.
Diffstat (limited to 'player')
-rw-r--r-- | player/loadfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/player/loadfile.c b/player/loadfile.c index d98f8f942a..4a7a71f421 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1200,6 +1200,9 @@ reopen_file: MP_VERBOSE(mpctx, "Starting playback...\n"); + mpctx->playback_initialized = true; + mp_notify(mpctx, MPV_EVENT_FILE_LOADED, NULL); + if (mpctx->max_frames == 0) { if (!mpctx->stop_play) mpctx->stop_play = PT_NEXT_ENTRY; @@ -1225,9 +1228,6 @@ reopen_file: if (mpctx->opts->pause) pause_player(mpctx); - mpctx->playback_initialized = true; - mp_notify(mpctx, MPV_EVENT_FILE_LOADED, NULL); - playback_start = mp_time_sec(); mpctx->error_playing = 0; while (!mpctx->stop_play) |