1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 21:06:00 +00:00

chmap_sel: do naive speaker replacements last

This prevents that the potentially better pick by
mp_chmap_sel_fallback() is overridden.
This commit is contained in:
wm4 2015-06-12 19:21:01 +02:00
parent 433402b56c
commit 55624a70ee

View File

@ -176,6 +176,10 @@ bool mp_chmap_sel_adjust(const struct mp_chmap_sel *s, struct mp_chmap *map)
return true;
}
}
if (mp_chmap_sel_fallback(s, map))
return true;
for (int i = 0; i < MP_ARRAY_SIZE(speaker_replacements); i++) {
struct mp_chmap t = *map;
struct mp_chmap *r = (struct mp_chmap *)speaker_replacements[i];
@ -185,9 +189,6 @@ bool mp_chmap_sel_adjust(const struct mp_chmap_sel *s, struct mp_chmap *map)
}
}
if (mp_chmap_sel_fallback(s, map))
return true;
// Fallback to mono/stereo as last resort
*map = (struct mp_chmap) MP_CHMAP_INIT_STEREO;
if (test_layout(s, map))