summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-19 12:37:37 +0200
committerJan Ekström <jeebjp@gmail.com>2018-05-31 01:24:51 +0300
commit942829463410d0e7ab27b3191205ecfd3c132f2d (patch)
tree139cb0a012a9a658dd33ea38a259742fd229f147 /player/command.c
parent36099d27f86af23e75c8a08b1b9aa41697dc86b1 (diff)
downloadmpv-942829463410d0e7ab27b3191205ecfd3c132f2d.tar.bz2
mpv-942829463410d0e7ab27b3191205ecfd3c132f2d.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/command.c')
-rw-r--r--player/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/command.c b/player/command.c
index 60fb7447e1..87cd274d57 100644
--- a/player/command.c
+++ b/player/command.c
@@ -926,7 +926,7 @@ static int mp_property_disc_title(void *ctx, struct m_property *prop,
if (demux_stream_control(d, STREAM_CTRL_SET_CURRENT_TITLE, &title) < 0)
return M_PROPERTY_NOT_IMPLEMENTED;
if (!mpctx->stop_play)
- mpctx->stop_play = PT_RELOAD_FILE;
+ mpctx->stop_play = PT_CURRENT_ENTRY;
return M_PROPERTY_OK;
}
return M_PROPERTY_NOT_IMPLEMENTED;
@@ -1143,7 +1143,7 @@ static int mp_property_edition(void *ctx, struct m_property *prop,
if (edition != demuxer->edition) {
mpctx->opts->edition_id = edition;
if (!mpctx->stop_play)
- mpctx->stop_play = PT_RELOAD_FILE;
+ mpctx->stop_play = PT_CURRENT_ENTRY;
mp_wakeup_core(mpctx);
break; // make it accessible to the demuxer via option change notify
}