summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-19 12:37:37 +0200
committerwm4 <wm4@nowhere>2018-05-24 19:56:35 +0200
commit562d8e6d3236022a77e49a17948e25e493538f04 (patch)
tree801a0802af3cf0e0fdec43630dcada7d8c017f32 /player/loadfile.c
parentd7ca95c3ea90782c786a6a607d3713bb42a104b1 (diff)
downloadmpv-562d8e6d3236022a77e49a17948e25e493538f04.tar.bz2
mpv-562d8e6d3236022a77e49a17948e25e493538f04.tar.xz
player: simplify edition switching
The player fully restarts playback when the edition or disk title is changed. Before this, the player tried to reinitialized playback partially. For example, it did not print a new "Playing: <file>" message, and did not send playback end to libmpv users (scripts or applications). This playback restart code was a bit messy and could have unforeseen interactions with various state. There have been bugs before. Since it's a mostly cosmetic thing for an obscure feature, just change it to a full restart. This works well, though since it may have consequences for scripts or client API users, mention it in interface-changes.rst.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index dbee6ecd69..a948d1d03d 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1344,10 +1344,6 @@ static void play_current_file(struct MPContext *mpctx)
MP_INFO(mpctx, "Playing: %s\n", mpctx->filename);
-reopen_file:
-
- reset_playback_state(mpctx);
-
assert(mpctx->demuxer == NULL);
process_hooks(mpctx, "on_load");
@@ -1537,12 +1533,6 @@ terminate_playback:
mpctx->playback_initialized = false;
- if (mpctx->stop_play == PT_RELOAD_FILE) {
- mpctx->stop_play = KEEP_PLAYING;
- mp_cancel_reset(mpctx->playback_abort);
- goto reopen_file;
- }
-
m_config_restore_backups(mpctx->mconfig);
TA_FREEP(&mpctx->filter_root);