summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-10-03 16:45:02 -0500
committersfan5 <sfan5@live.de>2023-10-05 17:09:43 +0200
commit817c6f9cb72301469e9df13d327bdae75d2d8e76 (patch)
treec4859cd83adbf7a195e50a3af31a093319af1eb1
parent034f75dacd01bd0b7c6c03e39b193f891f0d5ef2 (diff)
downloadmpv-817c6f9cb72301469e9df13d327bdae75d2d8e76.tar.bz2
mpv-817c6f9cb72301469e9df13d327bdae75d2d8e76.tar.xz
player: remove unused mutate argument in mp_next_file
e277fadd60350caad1fc31e92a5076692e61dcc9 originally added this but it never actually did anything in the function... wm4 probably changed his mind but forget to delete it so just remove it here.
-rw-r--r--player/command.c2
-rw-r--r--player/core.h2
-rw-r--r--player/loadfile.c9
3 files changed, 6 insertions, 7 deletions
diff --git a/player/command.c b/player/command.c
index ef4dbd42c0..efb2436194 100644
--- a/player/command.c
+++ b/player/command.c
@@ -5310,7 +5310,7 @@ static void cmd_playlist_next_prev(void *p)
int dir = *(int *)cmd->priv;
int force = cmd->args[0].v.i;
- struct playlist_entry *e = mp_next_file(mpctx, dir, force, true);
+ struct playlist_entry *e = mp_next_file(mpctx, dir, force);
if (!e && !force) {
cmd->success = false;
return;
diff --git a/player/core.h b/player/core.h
index be06e4dc98..556620cf8a 100644
--- a/player/core.h
+++ b/player/core.h
@@ -523,7 +523,7 @@ struct track *mp_track_by_tid(struct MPContext *mpctx, enum stream_type type,
void add_demuxer_tracks(struct MPContext *mpctx, struct demuxer *demuxer);
bool mp_remove_track(struct MPContext *mpctx, struct track *track);
struct playlist_entry *mp_next_file(struct MPContext *mpctx, int direction,
- bool force, bool mutate);
+ bool force);
void mp_set_playlist_entry(struct MPContext *mpctx, struct playlist_entry *e);
void mp_play_files(struct MPContext *mpctx);
void update_demuxer_properties(struct MPContext *mpctx);
diff --git a/player/loadfile.c b/player/loadfile.c
index 3fcc7b633d..2efdf81e43 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1298,7 +1298,7 @@ void prefetch_next(struct MPContext *mpctx)
if (!mpctx->opts->prefetch_open)
return;
- struct playlist_entry *new_entry = mp_next_file(mpctx, +1, false, false);
+ struct playlist_entry *new_entry = mp_next_file(mpctx, +1, false);
if (new_entry && !mpctx->open_active && new_entry->filename) {
MP_VERBOSE(mpctx, "Prefetching: %s\n", new_entry->filename);
start_open(mpctx, new_entry->filename, new_entry->stream_flags, true);
@@ -1941,7 +1941,7 @@ terminate_playback:
process_hooks(mpctx, "on_after_end_file");
if (playlist_prev_continue) {
- struct playlist_entry *e = mp_next_file(mpctx, -1, false, true);
+ struct playlist_entry *e = mp_next_file(mpctx, -1, false);
if (e) {
mp_set_playlist_entry(mpctx, e);
play_current_file(mpctx);
@@ -1953,9 +1953,8 @@ terminate_playback:
// it can have side-effects and mutate mpctx.
// direction: -1 (previous) or +1 (next)
// force: if true, don't skip playlist entries marked as failed
-// mutate: if true, change loop counters
struct playlist_entry *mp_next_file(struct MPContext *mpctx, int direction,
- bool force, bool mutate)
+ bool force)
{
struct playlist_entry *next = playlist_get_next(mpctx->playlist, direction);
if (next && direction < 0 && !force) {
@@ -2027,7 +2026,7 @@ void mp_play_files(struct MPContext *mpctx)
if (mpctx->stop_play == PT_NEXT_ENTRY || mpctx->stop_play == PT_ERROR ||
mpctx->stop_play == AT_END_OF_FILE)
{
- new_entry = mp_next_file(mpctx, +1, false, true);
+ new_entry = mp_next_file(mpctx, +1, false);
} else if (mpctx->stop_play == PT_CURRENT_ENTRY) {
new_entry = mpctx->playlist->current;
}