summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index bd46983837..e3e1b4fa30 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1137,16 +1137,11 @@ goto_reopen_demuxer: ;
}
#endif
- reinit_video_chain(mpctx);
- reinit_audio_chain(mpctx);
- reinit_subs(mpctx, 0);
- reinit_subs(mpctx, 1);
-
- //==================== START PLAYING =======================
-
- if (!mpctx->d_video && !mpctx->d_audio) {
- struct demuxer *d = mpctx->demuxer;
+ if (!mpctx->current_track[0][STREAM_VIDEO] &&
+ !mpctx->current_track[0][STREAM_AUDIO])
+ {
MP_FATAL(mpctx, "No video or audio streams selected.\n");
+ struct demuxer *d = mpctx->demuxer;
if (d->stream->uncached_type == STREAMTYPE_DVB) {
int dir = mpctx->last_dvb_step;
if (demux_stream_control(d, STREAM_CTRL_DVB_STEP_CHANNEL, &dir) > 0)
@@ -1156,6 +1151,11 @@ goto_reopen_demuxer: ;
goto terminate_playback;
}
+ reinit_video_chain(mpctx);
+ reinit_audio_chain(mpctx);
+ reinit_subs(mpctx, 0);
+ reinit_subs(mpctx, 1);
+
MP_VERBOSE(mpctx, "Starting playback...\n");
if (mpctx->max_frames == 0) {