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.
This commit is contained in:
wm4 2017-09-27 16:22:06 +02:00
parent 868bf4da7d
commit 4582b8993d
1 changed files with 1 additions and 1 deletions

View File

@ -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];