summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-09-27 16:22:06 +0200
committerwm4 <wm4@nowhere>2017-09-27 16:22:06 +0200
commit4582b8993d3140b423f3449b8a5c676f71ded9fe (patch)
tree4957d686d5a4cfdd76305fa3c90b0640193902f7 /audio
parent868bf4da7dd841611fb87455194f80e963a1573e (diff)
downloadmpv-4582b8993d3140b423f3449b8a5c676f71ded9fe.tar.bz2
mpv-4582b8993d3140b423f3449b8a5c676f71ded9fe.tar.xz
audio: fix channel conversion with NA channels
The case at hand was 5.1 -> fl-fr-fc-lfe-na-na (apparently triggered by ALSA). That means only the NA channels have to be cleared, but the result was actually that fc and lfe were cleared. This is due to a simple regression in the reorder code, which quite obviously got the index of the first NA channel wrong.
Diffstat (limited to 'audio')
-rw-r--r--audio/aconverter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/aconverter.c b/audio/aconverter.c
index f4efc61dc6..283e12ba32 100644
--- a/audio/aconverter.c
+++ b/audio/aconverter.c
@@ -411,7 +411,7 @@ static bool reorder_planes(struct mp_aframe *mpa, int *reorder,
int next_na = 0;
for (int n = 0; n < num_planes; n++)
- next_na += newmap->speaker[n] == MP_SPEAKER_ID_NA;
+ next_na += newmap->speaker[n] != MP_SPEAKER_ID_NA;
for (int n = 0; n < num_planes; n++) {
int src = reorder[n];