avcodec/alsdec: call correct function for multi-channel coding
authorPaul B Mahol <onemda@gmail.com>
Sat, 1 Jul 2017 20:19:37 +0000 (22:19 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sun, 2 Jul 2017 14:45:15 +0000 (16:45 +0200)
Fixes #5942.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/alsdec.c

index d95e30d..b4b294d 100644 (file)
@@ -1637,7 +1637,7 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
                     independent_bs = 2;
 
             // if this is the last channel, it has to be decoded independently
-            if (c == avctx->channels - 1)
+            if (c == avctx->channels - 1 || (c & 1))
                 independent_bs = 1;
 
             if (independent_bs) {