libavcodec/wmaenc.c:238: error: Uninitialized Value
  The value read from nb_coefs[_] was never initialized.

libavcodec/wmaenc.c:238:17: 
236.             } else {
237.                 coefs += s->coefs_start;
238.                 n      = nb_coefs[ch];
                     ^
239.                 for (i = 0; i < n; i++) {
240.                     double t = *coefs++ / (exponents[i] * mult);

static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
                        int total_gain)
{
    int v, bsize, ch, coef_nb_bits, parse_exponents;
    float mdct_norm;
    int nb_coefs[MAX_CHANNELS];
    static const int fixed_exp[25] = {
        20, 20, 20, 20, 20,
        20, 20, 20, 20, 20,
        20, 20, 20, 20, 20,
        20, 20, 20, 20, 20,
        20, 20, 20, 20, 20
    };
    if (s->use_variable_block_len) {
        assert(0);
    } else {
        s->next_block_len_bits = s->frame_len_bits;
        s->prev_block_len_bits = s->frame_len_bits;
        s->block_len_bits      = s->frame_len_bits;
    }
    s->block_len = 1 << s->block_len_bits;
    bsize = s->frame_len_bits - s->block_len_bits;
    v = s->coefs_end[bsize] - s->coefs_start;
    for (ch = 0; ch < s->avctx->channels; ch++)
        nb_coefs[ch] = v;
    {
        int n4 = s->block_len / 2;
        mdct_norm = 1.0 / (float) n4;
        if (s->version == 1)
            mdct_norm *= sqrt(n4);
    }
    if (s->avctx->channels == 2)
        put_bits(&s->pb, 1, !!s->ms_stereo);
    for (ch = 0; ch < s->avctx->channels; ch++) {
        s->channel_coded[ch] = 1;
        if (s->channel_coded[ch])
            init_exp(s, ch, fixed_exp);
    }
    for (ch = 0; ch < s->avctx->channels; ch++) {
        if (s->channel_coded[ch]) {
            WMACoef *coefs1;
            float *coefs, *exponents, mult;
            int i, n;
            coefs1    = s->coefs1[ch];
            exponents = s->exponents[ch];
            mult      = pow(10, total_gain * 0.05) / s->max_exponent[ch];
            mult     *= mdct_norm;
            coefs     = src_coefs[ch];
            if (s->use_noise_coding && 0) {
                assert(0);
            } else {
                coefs += s->coefs_start;
                n      = nb_coefs[ch];
                for (i = 0; i < n; i++) {
                    double t = *coefs++ / (exponents[i] * mult);
                    if (t < -32768 || t > 32767)
                        return -1;
                    coefs1[i] = lrint(t);
                }
            }
        }
    }
    v = 0;
    for (ch = 0; ch < s->avctx->channels; ch++) {
        int a = s->channel_coded[ch];
        put_bits(&s->pb, 1, a);
        v |= a;
    }
    if (!v)
        return 1;
    for (v = total_gain - 1; v >= 127; v -= 127)
        put_bits(&s->pb, 7, 127);
    put_bits(&s->pb, 7, v);
    coef_nb_bits = ff_wma_total_gain_to_bits(total_gain);
    if (s->use_noise_coding) {
        for (ch = 0; ch < s->avctx->channels; ch++) {
            if (s->channel_coded[ch]) {
                int i, n;
                n = s->exponent_high_sizes[bsize];
                for (i = 0; i < n; i++) {
                    put_bits(&s->pb, 1, s->high_band_coded[ch][i] = 0);
                    if (0)
                        nb_coefs[ch] -= s->exponent_high_bands[bsize][i];
                }
            }
        }
    }
    parse_exponents = 1;
    if (s->block_len_bits != s->frame_len_bits)
        put_bits(&s->pb, 1, parse_exponents);
    if (parse_exponents) {
        for (ch = 0; ch < s->avctx->channels; ch++) {
            if (s->channel_coded[ch]) {
                if (s->use_exp_vlc) {
                    encode_exp_vlc(s, ch, fixed_exp);
                } else {
                    assert(0);
                }
            }
        }
    } else
        assert(0);
    for (ch = 0; ch < s->avctx->channels; ch++) {
        if (s->channel_coded[ch]) {
            int run, tindex;
            WMACoef *ptr, *eptr;
            tindex = (ch == 1 && s->ms_stereo);
            ptr    = &s->coefs1[ch][0];
            eptr   = ptr + nb_coefs[ch];
            run = 0;
            for (; ptr < eptr; ptr++) {
                if (*ptr) {
                    int level     = *ptr;
                    int abs_level = FFABS(level);
                    int code      = 0;
                    if (abs_level <= s->coef_vlcs[tindex]->max_level)
                        if (run < s->coef_vlcs[tindex]->levels[abs_level - 1])
                            code = run + s->int_table[tindex][abs_level - 1];
                    assert(code < s->coef_vlcs[tindex]->n);
                    put_bits(&s->pb, s->coef_vlcs[tindex]->huffbits[code],
                             s->coef_vlcs[tindex]->huffcodes[code]);
                    if (code == 0) {
                        if (1 << coef_nb_bits <= abs_level)
                            return -1;
                        put_bits(&s->pb, coef_nb_bits, abs_level);
                        put_bits(&s->pb, s->frame_len_bits, run);
                    }
                    put_bits(&s->pb, 1, level < 0);
                    run = 0;
                } else
                    run++;
            }
            if (run)
                put_bits(&s->pb, s->coef_vlcs[tindex]->huffbits[1],
                         s->coef_vlcs[tindex]->huffcodes[1]);
        }
        if (s->version == 1 && s->avctx->channels >= 2)
            avpriv_align_put_bits(&s->pb);
    }
    return 0;
}
['static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],\n                        int total_gain)\n{\n    int v, bsize, ch, coef_nb_bits, parse_exponents;\n    float mdct_norm;\n    int nb_coefs[MAX_CHANNELS];\n    static const int fixed_exp[25] = {\n        20, 20, 20, 20, 20,\n        20, 20, 20, 20, 20,\n        20, 20, 20, 20, 20,\n        20, 20, 20, 20, 20,\n        20, 20, 20, 20, 20\n    };\n    if (s->use_variable_block_len) {\n        assert(0);\n    } else {\n        s->next_block_len_bits = s->frame_len_bits;\n        s->prev_block_len_bits = s->frame_len_bits;\n        s->block_len_bits      = s->frame_len_bits;\n    }\n    s->block_len = 1 << s->block_len_bits;\n    bsize = s->frame_len_bits - s->block_len_bits;\n    v = s->coefs_end[bsize] - s->coefs_start;\n    for (ch = 0; ch < s->avctx->channels; ch++)\n        nb_coefs[ch] = v;\n    {\n        int n4 = s->block_len / 2;\n        mdct_norm = 1.0 / (float) n4;\n        if (s->version == 1)\n            mdct_norm *= sqrt(n4);\n    }\n    if (s->avctx->channels == 2)\n        put_bits(&s->pb, 1, !!s->ms_stereo);\n    for (ch = 0; ch < s->avctx->channels; ch++) {\n        s->channel_coded[ch] = 1;\n        if (s->channel_coded[ch])\n            init_exp(s, ch, fixed_exp);\n    }\n    for (ch = 0; ch < s->avctx->channels; ch++) {\n        if (s->channel_coded[ch]) {\n            WMACoef *coefs1;\n            float *coefs, *exponents, mult;\n            int i, n;\n            coefs1    = s->coefs1[ch];\n            exponents = s->exponents[ch];\n            mult      = pow(10, total_gain * 0.05) / s->max_exponent[ch];\n            mult     *= mdct_norm;\n            coefs     = src_coefs[ch];\n            if (s->use_noise_coding && 0) {\n                assert(0);\n            } else {\n                coefs += s->coefs_start;\n                n      = nb_coefs[ch];\n                for (i = 0; i < n; i++) {\n                    double t = *coefs++ / (exponents[i] * mult);\n                    if (t < -32768 || t > 32767)\n                        return -1;\n                    coefs1[i] = lrint(t);\n                }\n            }\n        }\n    }\n    v = 0;\n    for (ch = 0; ch < s->avctx->channels; ch++) {\n        int a = s->channel_coded[ch];\n        put_bits(&s->pb, 1, a);\n        v |= a;\n    }\n    if (!v)\n        return 1;\n    for (v = total_gain - 1; v >= 127; v -= 127)\n        put_bits(&s->pb, 7, 127);\n    put_bits(&s->pb, 7, v);\n    coef_nb_bits = ff_wma_total_gain_to_bits(total_gain);\n    if (s->use_noise_coding) {\n        for (ch = 0; ch < s->avctx->channels; ch++) {\n            if (s->channel_coded[ch]) {\n                int i, n;\n                n = s->exponent_high_sizes[bsize];\n                for (i = 0; i < n; i++) {\n                    put_bits(&s->pb, 1, s->high_band_coded[ch][i] = 0);\n                    if (0)\n                        nb_coefs[ch] -= s->exponent_high_bands[bsize][i];\n                }\n            }\n        }\n    }\n    parse_exponents = 1;\n    if (s->block_len_bits != s->frame_len_bits)\n        put_bits(&s->pb, 1, parse_exponents);\n    if (parse_exponents) {\n        for (ch = 0; ch < s->avctx->channels; ch++) {\n            if (s->channel_coded[ch]) {\n                if (s->use_exp_vlc) {\n                    encode_exp_vlc(s, ch, fixed_exp);\n                } else {\n                    assert(0);\n                }\n            }\n        }\n    } else\n        assert(0);\n    for (ch = 0; ch < s->avctx->channels; ch++) {\n        if (s->channel_coded[ch]) {\n            int run, tindex;\n            WMACoef *ptr, *eptr;\n            tindex = (ch == 1 && s->ms_stereo);\n            ptr    = &s->coefs1[ch][0];\n            eptr   = ptr + nb_coefs[ch];\n            run = 0;\n            for (; ptr < eptr; ptr++) {\n                if (*ptr) {\n                    int level     = *ptr;\n                    int abs_level = FFABS(level);\n                    int code      = 0;\n                    if (abs_level <= s->coef_vlcs[tindex]->max_level)\n                        if (run < s->coef_vlcs[tindex]->levels[abs_level - 1])\n                            code = run + s->int_table[tindex][abs_level - 1];\n                    assert(code < s->coef_vlcs[tindex]->n);\n                    put_bits(&s->pb, s->coef_vlcs[tindex]->huffbits[code],\n                             s->coef_vlcs[tindex]->huffcodes[code]);\n                    if (code == 0) {\n                        if (1 << coef_nb_bits <= abs_level)\n                            return -1;\n                        put_bits(&s->pb, coef_nb_bits, abs_level);\n                        put_bits(&s->pb, s->frame_len_bits, run);\n                    }\n                    put_bits(&s->pb, 1, level < 0);\n                    run = 0;\n                } else\n                    run++;\n            }\n            if (run)\n                put_bits(&s->pb, s->coef_vlcs[tindex]->huffbits[1],\n                         s->coef_vlcs[tindex]->huffcodes[1]);\n        }\n        if (s->version == 1 && s->avctx->channels >= 2)\n            avpriv_align_put_bits(&s->pb);\n    }\n    return 0;\n}']