summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-02 14:02:32 +0200
committerwm4 <wm4@nowhere>2015-07-02 14:02:37 +0200
commit899dfa957f23bc92c2fa54bda9b856435639fd8c (patch)
treedd30ae9da01aff363e822ee0deb2a005d08cd7a5 /player/loadfile.c
parentff25c0ad7d7c3d1ca6f147a689884afc24e4b250 (diff)
downloadmpv-899dfa957f23bc92c2fa54bda9b856435639fd8c.tar.bz2
mpv-899dfa957f23bc92c2fa54bda9b856435639fd8c.tar.xz
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.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c12
1 files changed, 6 insertions, 6 deletions
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);