summaryrefslogtreecommitdiffstats
path: root/audio/chmap.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-12 17:45:47 +0200
committerwm4 <wm4@nowhere>2015-06-12 17:45:47 +0200
commit11fee81a7af8cd6d6e4038107fdc4bfb142de0cc (patch)
tree518cc762e4ac4ebe7e7a8835e965e743d72a51aa /audio/chmap.c
parent627b87b0d8b165e76c5715cdda1cee578ec3a6fa (diff)
downloadmpv-11fee81a7af8cd6d6e4038107fdc4bfb142de0cc.tar.bz2
mpv-11fee81a7af8cd6d6e4038107fdc4bfb142de0cc.tar.xz
audio: fix messed up channel reordering
Quite a blunder, really.
Diffstat (limited to 'audio/chmap.c')
-rw-r--r--audio/chmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/chmap.c b/audio/chmap.c
index f04815d210..93a15f2f57 100644
--- a/audio/chmap.c
+++ b/audio/chmap.c
@@ -384,8 +384,8 @@ void mp_chmap_get_reorder(int src[MP_NUM_CHANNELS], const struct mp_chmap *from,
return;
}
- for (int n = 0; n < from->num; n++) {
- for (int i = 0; i < to->num; i++) {
+ for (int n = 0; n < to->num; n++) {
+ for (int i = 0; i < from->num; i++) {
if (to->speaker[n] == from->speaker[i]) {
src[n] = i;
break;