1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-29 02:22:19 +00:00

player: remove unnecessary check

Remove the check that the external filename is not the same as the
currently playing one, which prevents mpv from loading images again as
external cover art, but this isn't necessary because cover art is only
added when playing standalone audio. I had only added this check because
I would otherwise get a segfault only when compiling with gcc 10.2 with
optimize and changing position within a playlist of multiple images (and
this couldn't even be reproduced by Dudemanguy on the same gcc version),
but this was caused by the uninitialized lang variable which is now
fixed.
This commit is contained in:
Guido Cella 2021-06-20 17:11:00 +02:00 committed by Dudemanguy
parent f70995cc9b
commit 9eb126a798

View File

@ -221,7 +221,7 @@ static void append_dir_subtitles(struct mpv_global *global, struct MPOpts *opts,
int prio = 0;
if (bstrcmp(tmp_fname_trim, f_fname_trim) == 0 &&
(type != STREAM_VIDEO || (fuzz != 1 && bstrcmp(dename, f_fname) != 0)))
(type != STREAM_VIDEO || fuzz != 1))
prio |= 32; // exact movie name match
bstr lang = {0};