From 899dfa957f23bc92c2fa54bda9b856435639fd8c Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 2 Jul 2015 14:02:32 +0200 Subject: player: unentangle --stream-dump The final goal is making opening the demuxer and opening the stream the same operation. Stream dumping is a rather uninteresting feature, but has a small number of vocal users, and it's easy to keep. --- player/loadfile.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'player/loadfile.c') diff --git a/player/loadfile.c b/player/loadfile.c index 3f753d1dfd..976e729287 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1079,6 +1079,12 @@ static void play_current_file(struct MPContext *mpctx) if (process_open_hooks(mpctx) < 0) goto terminate_playback; + if (opts->stream_dump && opts->stream_dump[0]) { + if (stream_dump(mpctx, mpctx->stream_open_filename) < 0) + mpctx->error_playing = 1; + goto terminate_playback; + } + int stream_flags = STREAM_READ; if (!opts->load_unsafe_playlists) stream_flags |= mpctx->playing->stream_flags; @@ -1087,12 +1093,6 @@ static void play_current_file(struct MPContext *mpctx) if (!mpctx->stream) goto terminate_playback; - if (opts->stream_dump && opts->stream_dump[0]) { - stream_dump(mpctx); - mpctx->error_playing = 1; - goto terminate_playback; - } - // Must be called before enabling cache. mp_nav_init(mpctx); -- cgit v1.2.3