summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/interface-changes.rst2
-rw-r--r--player/command.c4
-rw-r--r--player/core.h1
-rw-r--r--player/loadfile.c10
4 files changed, 4 insertions, 13 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 49c9bda9ba..b2974eff12 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -109,6 +109,8 @@ Interface changes
- mpv_command_node() and mp.command_native() now support named arguments
(see manpage). If you want to use them, use a new version of the manpage
as reference, which lists the definitive names.
+ - edition and disc title switching will now fully reload playback (may have
+ consequences for scripts, client API, or when using file-local options)
--- mpv 0.28.0 ---
- rename --hwdec=mediacodec option to mediacodec-copy, to reflect
conventions followed by other hardware video decoding APIs
diff --git a/player/command.c b/player/command.c
index 292384f2d9..4c46203ab4 100644
--- a/player/command.c
+++ b/player/command.c
@@ -928,7 +928,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;
@@ -1145,7 +1145,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
}
diff --git a/player/core.h b/player/core.h
index 43fc824e4f..39ea2fe07e 100644
--- a/player/core.h
+++ b/player/core.h
@@ -43,7 +43,6 @@ enum stop_play_reason {
PT_NEXT_ENTRY, // prepare to play next entry in playlist
PT_CURRENT_ENTRY, // prepare to play mpctx->playlist->current
PT_STOP, // stop playback, clear playlist
- PT_RELOAD_FILE, // restart playback
PT_QUIT, // stop playback, quit player
PT_ERROR, // play next playlist entry (due to an error)
};
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);