From 9eb126a798f0fd112e5b343c3e56d8815d633620 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Sun, 20 Jun 2021 17:11:00 +0200 Subject: 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. --- player/external_files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') diff --git a/player/external_files.c b/player/external_files.c index 0e3fad73f7..412f28405b 100644 --- a/player/external_files.c +++ b/player/external_files.c @@ -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}; -- cgit v1.2.3