libavcodec/dcadec.c:1286: error: Buffer Overrun L2
  Offset: [0, 255] Size: 8 by call to `dca_downmix`.

libavcodec/dcadec.c:1270:1: Parameter `s->samples_chanptr[*]`
1268. }
1269. 
1270. static int dca_filter_channels(DCAContext *s, int block_index)
      ^
1271. {
1272.     float (*subband_samples)[DCA_SUBBANDS][8] = s->subband_samples[block_index];

libavcodec/dcadec.c:1286:9: Call
1284.     /* Down mixing */
1285.     if (s->avctx->request_channels == 2 && s->prim_channels > 2) {
1286.         dca_downmix(s->samples_chanptr, s->amode, s->downmix_coef, s->channel_order_tab);
              ^
1287.     }
1288. 

libavcodec/dcadec.c:1057:9: <Offset trace>
1055.         l = channel_mapping[1];
1056.         r = channel_mapping[2];
1057.         DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef), );
              ^
1058.         break;
1059.     case DCA_2F1R:

libavcodec/dcadec.c:1057:9: Assignment
  1055.         l = channel_mapping[1];
  1056.         r = channel_mapping[2];
  1057.         DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef), );
                ^
  1058.         break;
  1059.     case DCA_2F1R:

libavcodec/dcadec.c:1029:1: <Length trace>
1027.     }
1028. 
1029. static void dca_downmix(float **samples, int srcfmt,
      ^
1030.                         int downmix_coef[DCA_PRIM_CHANNELS_MAX][2],
1031.                         const int8_t *channel_mapping)

libavcodec/dcadec.c:1029:1: Parameter `**samples`
  1027.     }
  1028. 
  1029. static void dca_downmix(float **samples, int srcfmt,
        ^
  1030.                         int downmix_coef[DCA_PRIM_CHANNELS_MAX][2],
  1031.                         const int8_t *channel_mapping)

libavcodec/dcadec.c:1057:9: Array access: Offset: [0, 255] Size: 8 by call to `dca_downmix` 
  1055.         l = channel_mapping[1];
  1056.         r = channel_mapping[2];
  1057.         DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef), );
                ^
  1058.         break;
  1059.     case DCA_2F1R:

static void dca_downmix(float **samples, int srcfmt,
                        int downmix_coef[DCA_PRIM_CHANNELS_MAX][2],
                        const int8_t *channel_mapping)
{
    int c, l, r, sl, sr, s;
    int i;
    float t, u, v;
    float coef[DCA_PRIM_CHANNELS_MAX][2];
    for (i = 0; i < DCA_PRIM_CHANNELS_MAX; i++) {
        coef[i][0] = dca_downmix_coeffs[downmix_coef[i][0]];
        coef[i][1] = dca_downmix_coeffs[downmix_coef[i][1]];
    }
    switch (srcfmt) {
    case DCA_MONO:
    case DCA_CHANNEL:
    case DCA_STEREO_TOTAL:
    case DCA_STEREO_SUMDIFF:
    case DCA_4F2R:
        av_log(NULL, 0, "Not implemented!\n");
        break;
    case DCA_STEREO:
        break;
    case DCA_3F:
        c = channel_mapping[0];
        l = channel_mapping[1];
        r = channel_mapping[2];
        DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef), );
        break;
    case DCA_2F1R:
        s = channel_mapping[2];
        DOWNMIX_TO_STEREO(MIX_REAR1(samples, s, 2, coef), );
        break;
    case DCA_3F1R:
        c = channel_mapping[0];
        l = channel_mapping[1];
        r = channel_mapping[2];
        s = channel_mapping[3];
        DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef),
                          MIX_REAR1(samples, s, 3, coef));
        break;
    case DCA_2F2R:
        sl = channel_mapping[2];
        sr = channel_mapping[3];
        DOWNMIX_TO_STEREO(MIX_REAR2(samples, sl, sr, 2, coef), );
        break;
    case DCA_3F2R:
        c  = channel_mapping[0];
        l  = channel_mapping[1];
        r  = channel_mapping[2];
        sl = channel_mapping[3];
        sr = channel_mapping[4];
        DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef),
                          MIX_REAR2(samples, sl, sr, 3, coef));
        break;
    }
}
['static int dca_filter_channels(DCAContext *s, int block_index)\n{\n    float (*subband_samples)[DCA_SUBBANDS][8] = s->subband_samples[block_index];\n    int k;\n    for (k = 0; k < s->prim_channels; k++) {\n        qmf_32_subbands(s, k, subband_samples[k],\n                        s->samples_chanptr[s->channel_order_tab[k]],\n                        M_SQRT1_2 / 32768.0  );\n    }\n    if (s->avctx->request_channels == 2 && s->prim_channels > 2) {\n        dca_downmix(s->samples_chanptr, s->amode, s->downmix_coef, s->channel_order_tab);\n    }\n    if (s->output & DCA_LFE) {\n        lfe_interpolation_fir(s, s->lfe, 2 * s->lfe,\n                              s->lfe_data + 2 * s->lfe * (block_index + 4),\n                              s->samples_chanptr[dca_lfe_index[s->amode]],\n                              1.0 / (256.0 * 32768.0));\n    }\n    return 0;\n}', 'static void dca_downmix(float **samples, int srcfmt,\n                        int downmix_coef[DCA_PRIM_CHANNELS_MAX][2],\n                        const int8_t *channel_mapping)\n{\n    int c, l, r, sl, sr, s;\n    int i;\n    float t, u, v;\n    float coef[DCA_PRIM_CHANNELS_MAX][2];\n    for (i = 0; i < DCA_PRIM_CHANNELS_MAX; i++) {\n        coef[i][0] = dca_downmix_coeffs[downmix_coef[i][0]];\n        coef[i][1] = dca_downmix_coeffs[downmix_coef[i][1]];\n    }\n    switch (srcfmt) {\n    case DCA_MONO:\n    case DCA_CHANNEL:\n    case DCA_STEREO_TOTAL:\n    case DCA_STEREO_SUMDIFF:\n    case DCA_4F2R:\n        av_log(NULL, 0, "Not implemented!\\n");\n        break;\n    case DCA_STEREO:\n        break;\n    case DCA_3F:\n        c = channel_mapping[0];\n        l = channel_mapping[1];\n        r = channel_mapping[2];\n        DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef), );\n        break;\n    case DCA_2F1R:\n        s = channel_mapping[2];\n        DOWNMIX_TO_STEREO(MIX_REAR1(samples, s, 2, coef), );\n        break;\n    case DCA_3F1R:\n        c = channel_mapping[0];\n        l = channel_mapping[1];\n        r = channel_mapping[2];\n        s = channel_mapping[3];\n        DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef),\n                          MIX_REAR1(samples, s, 3, coef));\n        break;\n    case DCA_2F2R:\n        sl = channel_mapping[2];\n        sr = channel_mapping[3];\n        DOWNMIX_TO_STEREO(MIX_REAR2(samples, sl, sr, 2, coef), );\n        break;\n    case DCA_3F2R:\n        c  = channel_mapping[0];\n        l  = channel_mapping[1];\n        r  = channel_mapping[2];\n        sl = channel_mapping[3];\n        sr = channel_mapping[4];\n        DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef),\n                          MIX_REAR2(samples, sl, sr, 3, coef));\n        break;\n    }\n}']