diff mbox

[FFmpeg-devel,2/2] avcodec/alsdec: call correct function for multi-channel coding

Message ID 20170701202307.2243-2-onemda@gmail.com
State New
Headers show

Commit Message

Paul B Mahol July 1, 2017, 8:23 p.m. UTC
Fixes #5942.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/alsdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thilo Borgmann July 2, 2017, 2:13 p.m. UTC | #1
Am 01.07.17 um 22:23 schrieb Paul B Mahol:
> Fixes #5942.
> 
> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
>  libavcodec/alsdec.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

OK if tested.

-Thilo
diff mbox

Patch

diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index ac59885..000a61d 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1616,9 +1616,9 @@  static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
     }
 
     if (!sconf->mc_coding || ctx->js_switch) {
-        int independent_bs = !sconf->joint_stereo;
-
         for (c = 0; c < avctx->channels; c++) {
+            int independent_bs = !(sconf->joint_stereo && (c < avctx->channels - 1) && (c % 2 == 0));
+
             js_blocks[0] = 0;
             js_blocks[1] = 0;