mirror of https://github.com/mpv-player/mpv
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:
parent
868bf4da7d
commit
4582b8993d
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue