summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-12 19:21:01 +0200
committerwm4 <wm4@nowhere>2015-06-12 19:21:01 +0200
commit55624a70eeac79d6a5a208a078458f1fe07b833a (patch)
tree3083a1e3409efef8dcce0c5d1b16291eab10b286 /audio
parent433402b56cdc2a32a6cb45d13a234b9617a3c9f9 (diff)
downloadmpv-55624a70eeac79d6a5a208a078458f1fe07b833a.tar.bz2
mpv-55624a70eeac79d6a5a208a078458f1fe07b833a.tar.xz
chmap_sel: do naive speaker replacements last
This prevents that the potentially better pick by mp_chmap_sel_fallback() is overridden.
Diffstat (limited to 'audio')
-rw-r--r--audio/chmap_sel.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/audio/chmap_sel.c b/audio/chmap_sel.c
index 3d93a11a5c..855d0dc683 100644
--- a/audio/chmap_sel.c
+++ b/audio/chmap_sel.c
@@ -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))