diff --git a/player/command.c b/player/command.c index 6cfd25b6fa..0d4c0ce9ca 100644 --- a/player/command.c +++ b/player/command.c @@ -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; } } diff --git a/player/playloop.c b/player/playloop.c index e101f5fe3d..099a1509c1 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -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;