Revert "player: do not exit when a seek gets queued"

In various edge cases, this causes an assertion that was added later in
8816e1117e to be hit. The actual purpose
of the special case is not really clear. mp_seek already will change the
mpctx->stop_play value, so there shouldn't be any need to do it in
queue_seek. And it is known to cause problems so revert it. Also, remove
the special play direction logic that works around this behavior.
Fixes #13778.

This reverts commit dbdc46c97a.
This commit is contained in:
Dudemanguy 2024-05-15 10:32:50 -05:00
parent 03ca340835
commit d59f4fd3ec
2 changed files with 2 additions and 10 deletions

View File

@ -7441,16 +7441,11 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags,
if (opt_ptr == &opts->play_dir) {
if (mpctx->play_dir != opts->play_dir) {
// Some weird things for play_dir if we're at EOF.
// 1. The option must be set before we seek.
// 2. queue_seek can change the stop_play value; always keep the old one.
int old_stop_play = mpctx->stop_play;
if (old_stop_play == AT_END_OF_FILE)
// The option must be set before we seek if we're at EOF.
if (mpctx->stop_play == AT_END_OF_FILE)
mpctx->play_dir = opts->play_dir;
queue_seek(mpctx, MPSEEK_ABSOLUTE, get_current_time(mpctx),
MPSEEK_EXACT, 0);
if (old_stop_play == AT_END_OF_FILE)
mpctx->stop_play = old_stop_play;
}
}

View File

@ -430,9 +430,6 @@ void queue_seek(struct MPContext *mpctx, enum seek_type type, double amount,
mp_wakeup_core(mpctx);
if (mpctx->stop_play == AT_END_OF_FILE)
mpctx->stop_play = KEEP_PLAYING;
switch (type) {
case MPSEEK_RELATIVE:
seek->flags |= flags;