summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2021-07-28 17:00:38 +0200
committerDudemanguy <random342@airmail.cc>2021-07-29 13:38:28 +0000
commit3f0e8bd506e3e3fc6eb9927f0b2d04b23e9105a2 (patch)
tree52f3cfaf94c8888c33462afd7fc57bbe97da14e0 /player
parent67ddffcc264e4d9af4dd93e82e5f997049ac49d1 (diff)
downloadmpv-3f0e8bd506e3e3fc6eb9927f0b2d04b23e9105a2.tar.bz2
mpv-3f0e8bd506e3e3fc6eb9927f0b2d04b23e9105a2.tar.xz
options: audio-display determines cover priority
Let audio-display determine whether embedded images or external cover art tracks should be selected when both are present. Attached pictures are given priority by default as requested in #8539. Also updates references to attached pictures in the log and manpage to refer to cover art as well. Closes #8539.
Diffstat (limited to 'player')
-rw-r--r--player/loadfile.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index e992df694f..3c0415aed6 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -476,8 +476,12 @@ static bool compare_track(struct track *t1, struct track *t2, char **langs,
return !t1->is_external;
bool ext1 = t1->is_external && !t1->no_default;
bool ext2 = t2->is_external && !t2->no_default;
- if (ext1 != ext2)
+ if (ext1 != ext2) {
+ if (t1->attached_picture && t2->attached_picture
+ && opts->audio_display == 1)
+ return !ext1;
return ext1;
+ }
if (t1->auto_loaded != t2->auto_loaded)
return !t1->auto_loaded;
int l1 = match_lang(langs, t1->lang), l2 = match_lang(langs, t2->lang);
@@ -1619,7 +1623,7 @@ static void play_current_file(struct MPContext *mpctx)
if (mpctx->vo_chain && mpctx->vo_chain->is_coverart) {
MP_INFO(mpctx,
- "Displaying attached picture. Use --no-audio-display to prevent this.\n");
+ "Displaying cover art. Use --no-audio-display to prevent this.\n");
}
if (!mpctx->vo_chain)