libavcodec/vorbisdec.c:1604: error: Uninitialized Value
  The value read from res_chan[_] was never initialized.

libavcodec/vorbisdec.c:1604:9: 
1602. 
1603.     for (j = vc->audio_channels-1;j >= 0; j--) {
1604.         ch_res_ptr   = vc->channel_residues + res_chan[j] * blocksize / 2;
              ^
1605.         vc->fdsp.vector_fmul(floor_ptr[j], floor_ptr[j], ch_res_ptr, blocksize / 2);
1606.         mdct->imdct_half(mdct, ch_res_ptr, floor_ptr[j]);

static int vorbis_parse_audio_packet(vorbis_context *vc, float **floor_ptr)
{
    GetBitContext *gb = &vc->gb;
    FFTContext *mdct;
    unsigned previous_window = vc->previous_window;
    unsigned mode_number, blockflag, blocksize;
    int i, j;
    uint8_t no_residue[255];
    uint8_t do_not_decode[255];
    vorbis_mapping *mapping;
    float *ch_res_ptr   = vc->channel_residues;
    uint8_t res_chan[255];
    unsigned res_num = 0;
    int retlen  = 0;
    unsigned ch_left = vc->audio_channels;
    unsigned vlen;
    if (get_bits1(gb)) {
        av_log(vc->avccontext, AV_LOG_ERROR, "Not a Vorbis I audio packet.\n");
        return AVERROR_INVALIDDATA;
    }
    if (vc->mode_count == 1) {
        mode_number = 0;
    } else {
        GET_VALIDATED_INDEX(mode_number, ilog(vc->mode_count-1), vc->mode_count)
    }
    vc->mode_number = mode_number;
    mapping = &vc->mappings[vc->modes[mode_number].mapping];
    av_dlog(NULL, " Mode number: %u , mapping: %d , blocktype %d\n", mode_number,
            vc->modes[mode_number].mapping, vc->modes[mode_number].blockflag);
    blockflag = vc->modes[mode_number].blockflag;
    blocksize = vc->blocksize[blockflag];
    vlen = blocksize / 2;
    if (blockflag) {
        previous_window = get_bits(gb, 1);
        skip_bits1(gb);
    }
    memset(ch_res_ptr,   0, sizeof(float) * vc->audio_channels * vlen);
    for (i = 0; i < vc->audio_channels; ++i)
        memset(floor_ptr[i], 0, vlen * sizeof(floor_ptr[0][0]));
    for (i = 0; i < vc->audio_channels; ++i) {
        vorbis_floor *floor;
        int ret;
        if (mapping->submaps > 1) {
            floor = &vc->floors[mapping->submap_floor[mapping->mux[i]]];
        } else {
            floor = &vc->floors[mapping->submap_floor[0]];
        }
        ret = floor->decode(vc, &floor->data, floor_ptr[i]);
        if (ret < 0) {
            av_log(vc->avccontext, AV_LOG_ERROR, "Invalid codebook in vorbis_floor_decode.\n");
            return AVERROR_INVALIDDATA;
        }
        no_residue[i] = ret;
    }
    for (i = mapping->coupling_steps - 1; i >= 0; --i) {
        if (!(no_residue[mapping->magnitude[i]] & no_residue[mapping->angle[i]])) {
            no_residue[mapping->magnitude[i]] = 0;
            no_residue[mapping->angle[i]]     = 0;
        }
    }
    for (i = 0; i < mapping->submaps; ++i) {
        vorbis_residue *residue;
        unsigned ch = 0;
        int ret;
        for (j = 0; j < vc->audio_channels; ++j) {
            if ((mapping->submaps == 1) || (i == mapping->mux[j])) {
                res_chan[j] = res_num;
                if (no_residue[j]) {
                    do_not_decode[ch] = 1;
                } else {
                    do_not_decode[ch] = 0;
                }
                ++ch;
                ++res_num;
            }
        }
        residue = &vc->residues[mapping->submap_residue[i]];
        if (ch_left < ch) {
            av_log(vc->avccontext, AV_LOG_ERROR, "Too many channels in vorbis_floor_decode.\n");
            return -1;
        }
        if (ch) {
            ret = vorbis_residue_decode(vc, residue, ch, do_not_decode, ch_res_ptr, vlen, ch_left);
            if (ret < 0)
                return ret;
        }
        ch_res_ptr += ch * vlen;
        ch_left -= ch;
    }
    if (ch_left > 0)
        return AVERROR_INVALIDDATA;
    for (i = mapping->coupling_steps - 1; i >= 0; --i) {
        float *mag, *ang;
        mag = vc->channel_residues+res_chan[mapping->magnitude[i]] * blocksize / 2;
        ang = vc->channel_residues+res_chan[mapping->angle[i]]     * blocksize / 2;
        vc->dsp.vorbis_inverse_coupling(mag, ang, blocksize / 2);
    }
    mdct = &vc->mdct[blockflag];
    for (j = vc->audio_channels-1;j >= 0; j--) {
        ch_res_ptr   = vc->channel_residues + res_chan[j] * blocksize / 2;
        vc->fdsp.vector_fmul(floor_ptr[j], floor_ptr[j], ch_res_ptr, blocksize / 2);
        mdct->imdct_half(mdct, ch_res_ptr, floor_ptr[j]);
    }
    retlen = (blocksize + vc->blocksize[previous_window]) / 4;
    for (j = 0; j < vc->audio_channels; j++) {
        unsigned bs0 = vc->blocksize[0];
        unsigned bs1 = vc->blocksize[1];
        float *residue    = vc->channel_residues + res_chan[j] * blocksize / 2;
        float *saved      = vc->saved + j * bs1 / 4;
        float *ret        = floor_ptr[j];
        float *buf        = residue;
        const float *win  = vc->win[blockflag & previous_window];
        if (blockflag == previous_window) {
            vc->dsp.vector_fmul_window(ret, saved, buf, win, blocksize / 4);
        } else if (blockflag > previous_window) {
            vc->dsp.vector_fmul_window(ret, saved, buf, win, bs0 / 4);
            memcpy(ret+bs0/2, buf+bs0/4, ((bs1-bs0)/4) * sizeof(float));
        } else {
            memcpy(ret, saved, ((bs1 - bs0) / 4) * sizeof(float));
            vc->dsp.vector_fmul_window(ret + (bs1 - bs0) / 4, saved + (bs1 - bs0) / 4, buf, win, bs0 / 4);
        }
        memcpy(saved, buf + blocksize / 4, blocksize / 4 * sizeof(float));
    }
    vc->previous_window = blockflag;
    return retlen;
}
['static int vorbis_parse_audio_packet(vorbis_context *vc, float **floor_ptr)\n{\n    GetBitContext *gb = &vc->gb;\n    FFTContext *mdct;\n    unsigned previous_window = vc->previous_window;\n    unsigned mode_number, blockflag, blocksize;\n    int i, j;\n    uint8_t no_residue[255];\n    uint8_t do_not_decode[255];\n    vorbis_mapping *mapping;\n    float *ch_res_ptr   = vc->channel_residues;\n    uint8_t res_chan[255];\n    unsigned res_num = 0;\n    int retlen  = 0;\n    unsigned ch_left = vc->audio_channels;\n    unsigned vlen;\n    if (get_bits1(gb)) {\n        av_log(vc->avccontext, AV_LOG_ERROR, "Not a Vorbis I audio packet.\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    if (vc->mode_count == 1) {\n        mode_number = 0;\n    } else {\n        GET_VALIDATED_INDEX(mode_number, ilog(vc->mode_count-1), vc->mode_count)\n    }\n    vc->mode_number = mode_number;\n    mapping = &vc->mappings[vc->modes[mode_number].mapping];\n    av_dlog(NULL, " Mode number: %u , mapping: %d , blocktype %d\\n", mode_number,\n            vc->modes[mode_number].mapping, vc->modes[mode_number].blockflag);\n    blockflag = vc->modes[mode_number].blockflag;\n    blocksize = vc->blocksize[blockflag];\n    vlen = blocksize / 2;\n    if (blockflag) {\n        previous_window = get_bits(gb, 1);\n        skip_bits1(gb);\n    }\n    memset(ch_res_ptr,   0, sizeof(float) * vc->audio_channels * vlen);\n    for (i = 0; i < vc->audio_channels; ++i)\n        memset(floor_ptr[i], 0, vlen * sizeof(floor_ptr[0][0]));\n    for (i = 0; i < vc->audio_channels; ++i) {\n        vorbis_floor *floor;\n        int ret;\n        if (mapping->submaps > 1) {\n            floor = &vc->floors[mapping->submap_floor[mapping->mux[i]]];\n        } else {\n            floor = &vc->floors[mapping->submap_floor[0]];\n        }\n        ret = floor->decode(vc, &floor->data, floor_ptr[i]);\n        if (ret < 0) {\n            av_log(vc->avccontext, AV_LOG_ERROR, "Invalid codebook in vorbis_floor_decode.\\n");\n            return AVERROR_INVALIDDATA;\n        }\n        no_residue[i] = ret;\n    }\n    for (i = mapping->coupling_steps - 1; i >= 0; --i) {\n        if (!(no_residue[mapping->magnitude[i]] & no_residue[mapping->angle[i]])) {\n            no_residue[mapping->magnitude[i]] = 0;\n            no_residue[mapping->angle[i]]     = 0;\n        }\n    }\n    for (i = 0; i < mapping->submaps; ++i) {\n        vorbis_residue *residue;\n        unsigned ch = 0;\n        int ret;\n        for (j = 0; j < vc->audio_channels; ++j) {\n            if ((mapping->submaps == 1) || (i == mapping->mux[j])) {\n                res_chan[j] = res_num;\n                if (no_residue[j]) {\n                    do_not_decode[ch] = 1;\n                } else {\n                    do_not_decode[ch] = 0;\n                }\n                ++ch;\n                ++res_num;\n            }\n        }\n        residue = &vc->residues[mapping->submap_residue[i]];\n        if (ch_left < ch) {\n            av_log(vc->avccontext, AV_LOG_ERROR, "Too many channels in vorbis_floor_decode.\\n");\n            return -1;\n        }\n        if (ch) {\n            ret = vorbis_residue_decode(vc, residue, ch, do_not_decode, ch_res_ptr, vlen, ch_left);\n            if (ret < 0)\n                return ret;\n        }\n        ch_res_ptr += ch * vlen;\n        ch_left -= ch;\n    }\n    if (ch_left > 0)\n        return AVERROR_INVALIDDATA;\n    for (i = mapping->coupling_steps - 1; i >= 0; --i) {\n        float *mag, *ang;\n        mag = vc->channel_residues+res_chan[mapping->magnitude[i]] * blocksize / 2;\n        ang = vc->channel_residues+res_chan[mapping->angle[i]]     * blocksize / 2;\n        vc->dsp.vorbis_inverse_coupling(mag, ang, blocksize / 2);\n    }\n    mdct = &vc->mdct[blockflag];\n    for (j = vc->audio_channels-1;j >= 0; j--) {\n        ch_res_ptr   = vc->channel_residues + res_chan[j] * blocksize / 2;\n        vc->fdsp.vector_fmul(floor_ptr[j], floor_ptr[j], ch_res_ptr, blocksize / 2);\n        mdct->imdct_half(mdct, ch_res_ptr, floor_ptr[j]);\n    }\n    retlen = (blocksize + vc->blocksize[previous_window]) / 4;\n    for (j = 0; j < vc->audio_channels; j++) {\n        unsigned bs0 = vc->blocksize[0];\n        unsigned bs1 = vc->blocksize[1];\n        float *residue    = vc->channel_residues + res_chan[j] * blocksize / 2;\n        float *saved      = vc->saved + j * bs1 / 4;\n        float *ret        = floor_ptr[j];\n        float *buf        = residue;\n        const float *win  = vc->win[blockflag & previous_window];\n        if (blockflag == previous_window) {\n            vc->dsp.vector_fmul_window(ret, saved, buf, win, blocksize / 4);\n        } else if (blockflag > previous_window) {\n            vc->dsp.vector_fmul_window(ret, saved, buf, win, bs0 / 4);\n            memcpy(ret+bs0/2, buf+bs0/4, ((bs1-bs0)/4) * sizeof(float));\n        } else {\n            memcpy(ret, saved, ((bs1 - bs0) / 4) * sizeof(float));\n            vc->dsp.vector_fmul_window(ret + (bs1 - bs0) / 4, saved + (bs1 - bs0) / 4, buf, win, bs0 / 4);\n        }\n        memcpy(saved, buf + blocksize / 4, blocksize / 4 * sizeof(float));\n    }\n    vc->previous_window = blockflag;\n    return retlen;\n}']