mirror of https://github.com/mpv-player/mpv
m_option: don't try to remove all filter matches
Probably should have actually tested the filter changes but I didn't. This was the wrong spot anyway since labels are unique. Something like this should have been done further down when finding it by content. On second thought, having multiple filters with the same content does have a usecase (e.g. stacking multiple rotations) so removing all of them at once probably isn't great. There's no practical usecase for having duplicates in a string list, so we'll leave that change alone. Fixes #12791.
This commit is contained in:
parent
98a27b3cd1
commit
250429dac6
|
@ -3293,14 +3293,12 @@ static int parse_obj_settings_del(struct mp_log *log, struct bstr opt_name,
|
|||
return 0;
|
||||
if (dst) {
|
||||
int label_index = 0;
|
||||
while (label_index >= 0) {
|
||||
label_index = obj_settings_list_find_by_label(VAL(dst), label);
|
||||
if (label_index >= 0) {
|
||||
mark_del[label_index] = true;
|
||||
} else {
|
||||
mp_warn(log, "Option %.*s: item label @%.*s not found.\n",
|
||||
BSTR_P(opt_name), BSTR_P(label));
|
||||
}
|
||||
label_index = obj_settings_list_find_by_label(VAL(dst), label);
|
||||
if (label_index >= 0) {
|
||||
mark_del[label_index] = true;
|
||||
} else {
|
||||
mp_warn(log, "Option %.*s: item label @%.*s not found.\n",
|
||||
BSTR_P(opt_name), BSTR_P(label));
|
||||
}
|
||||
}
|
||||
*param = s;
|
||||
|
|
Loading…
Reference in New Issue