Merge commit 'c9ed48e80ef807ab0c1bb946ac8db5f34d83d9c9'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 17 Mar 2015 19:32:46 +0000 (20:32 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 17 Mar 2015 19:32:57 +0000 (20:32 +0100)
* commit 'c9ed48e80ef807ab0c1bb946ac8db5f34d83d9c9':
  dca: Read params->pancABIT0[param_index] only if part0 is set

Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/dca_xll.c

index 036b713..9e1085c 100644 (file)
@@ -514,8 +514,8 @@ int ff_dca_xll_decode_audio(DCAContext *s, AVFrame *frame)
             }
             for (i = 0; i < chset->channels; i++) {
                 int param_index = params->seg_type ? 0 : i;
-                int bits        = params->pancABIT0[param_index];
                 int part0       = params->nSamplPart0[param_index];
+                int bits        = part0 ? params->pancABIT0[param_index] : 0;
                 int *sample_buf = s->xll_sample_buf +
                                   (in_channel + i) * s->xll_smpl_in_seg;