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

libavcodec/dcadec.c:1245:1: Parameter `s->samples_chanptr[*]`
1243. }
1244. 
1245. static int dca_filter_channels(DCAContext *s, int block_index)
      ^
1246. {
1247.     float (*subband_samples)[DCA_SUBBANDS][8] = s->subband_samples[block_index];

libavcodec/dcadec.c:1272:9: Call
1270.     if (s->prim_channels + !!s->lfe > 2 &&
1271.         s->avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) {
1272.         dca_downmix(s->samples_chanptr, s->amode, !!s->lfe, s->downmix_coef,
              ^
1273.                     s->channel_order_tab);
1274.     }

libavcodec/dcadec.c:1016:9: <Offset trace>
1014.         l = channel_mapping[1];
1015.         r = channel_mapping[2];
1016.         DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef), );
              ^
1017.         break;
1018.     case DCA_2F1R:

libavcodec/dcadec.c:1016:9: Assignment
  1014.         l = channel_mapping[1];
  1015.         r = channel_mapping[2];
  1016.         DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef), );
                ^
  1017.         break;
  1018.     case DCA_2F1R:

libavcodec/dcadec.c:994:1: <Length trace>
992.     }
993. 
994. static void dca_downmix(float **samples, int srcfmt, int lfe_present,
     ^
995.                         float coef[DCA_PRIM_CHANNELS_MAX + 1][2],
996.                         const int8_t *channel_mapping)

libavcodec/dcadec.c:994:1: Parameter `**samples`
  992.     }
  993. 
  994. static void dca_downmix(float **samples, int srcfmt, int lfe_present,
       ^
  995.                         float coef[DCA_PRIM_CHANNELS_MAX + 1][2],
  996.                         const int8_t *channel_mapping)

libavcodec/dcadec.c:1016:9: Array access: Offset: [0, 255] Size: 8 by call to `dca_downmix` 
  1014.         l = channel_mapping[1];
  1015.         r = channel_mapping[2];
  1016.         DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef), );
                ^
  1017.         break;
  1018.     case DCA_2F1R:

static void dca_downmix(float **samples, int srcfmt, int lfe_present,
                        float coef[DCA_PRIM_CHANNELS_MAX + 1][2],
                        const int8_t *channel_mapping)
{
    int c, l, r, sl, sr, s;
    int i;
    float t, u, v;
    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;
    }
    if (lfe_present) {
        int lf_buf = dca_lfe_index[srcfmt];
        int lf_idx = dca_channels [srcfmt];
        for (i = 0; i < 256; i++) {
            samples[0][i] += samples[lf_buf][i] * coef[lf_idx][0];
            samples[1][i] += samples[lf_buf][i] * coef[lf_idx][1];
        }
    }
}
['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        if (s->channel_order_tab[k] >= 0)\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->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    if (s->prim_channels + !!s->lfe > 2 &&\n        s->avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) {\n        dca_downmix(s->samples_chanptr, s->amode, !!s->lfe, s->downmix_coef,\n                    s->channel_order_tab);\n    }\n    return 0;\n}', 'static void dca_downmix(float **samples, int srcfmt, int lfe_present,\n                        float coef[DCA_PRIM_CHANNELS_MAX + 1][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    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    if (lfe_present) {\n        int lf_buf = dca_lfe_index[srcfmt];\n        int lf_idx = dca_channels [srcfmt];\n        for (i = 0; i < 256; i++) {\n            samples[0][i] += samples[lf_buf][i] * coef[lf_idx][0];\n            samples[1][i] += samples[lf_buf][i] * coef[lf_idx][1];\n        }\n    }\n}']