From 2c3f4850b828bfbc45d4b3a4091f2ac4b39061a6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 3 Jan 2016 15:48:47 +0100 Subject: 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. --- player/loadfile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'player/loadfile.c') 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) -- cgit v1.2.3