From 4582b8993d3140b423f3449b8a5c676f71ded9fe Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 27 Sep 2017 16:22:06 +0200 Subject: 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. --- audio/aconverter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio') 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]; -- cgit v1.2.3