summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-11-18 14:45:48 -0600
committerDudemanguy <random342@airmail.cc>2023-11-18 14:48:44 -0600
commit77c92669752643fe82a4214fdd25786efe9f0890 (patch)
treec9e7013c3543fbf7e629123132597210cf287d72 /player/loadfile.c
parent69f3c7073314c76f1730dad2040e1f7f18be5c09 (diff)
downloadmpv-77c92669752643fe82a4214fdd25786efe9f0890.tar.bz2
mpv-77c92669752643fe82a4214fdd25786efe9f0890.tar.xz
loadfile: remove some dead code
034f75dacd01bd0b7c6c03e39b193f891f0d5ef2 removed the loop that could cause !next to actually happen here. This code would never be executed and is not needed.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index a0b9a75b7a..b7a4e31153 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1958,11 +1958,8 @@ struct playlist_entry *mp_next_file(struct MPContext *mpctx, int direction,
bool force)
{
struct playlist_entry *next = playlist_get_next(mpctx->playlist, direction);
- if (next && direction < 0 && !force) {
- if (!next && mpctx->opts->loop_times == 1)
- next = playlist_get_first(mpctx->playlist);
+ if (next && direction < 0 && !force)
next->playlist_prev_attempt = true;
- }
if (!next && mpctx->opts->loop_times != 1) {
if (direction > 0) {
if (mpctx->opts->shuffle)