libavcodec/opus_silk.c:1336: error: Uninitialized Value
  The value read from primarylag was never initialized.

libavcodec/opus_silk.c:1336:9: 
1334.                          highbits*silk_pitch_scale[s->bandwidth] + lowbits;
1335.         }
1336.         frame->primarylag = primarylag;
              ^
1337. 
1338.         if (s->subframes == 2)

static void silk_decode_frame(SilkContext *s, OpusRangeCoder *rc,
                              int frame_num, int channel, int coded_channels, int active, int active1)
{
    int voiced;
    int qoffset_high;
    int order;
    float lpc_leadin[16], lpc_body[16], residual[SILK_MAX_LAG + SILK_HISTORY];
    int has_lpc_leadin;
    float ltpscale;
    struct {
        float gain;
        int pitchlag;
        float ltptaps[5];
    } sf[4];
    SilkFrame * const frame = s->frame + channel;
    int i;
    if (coded_channels == 2 && channel == 0) {
        int n, wi[2], ws[2], w[2];
        n     = opus_rc_getsymbol(rc, silk_model_stereo_s1);
        wi[0] = opus_rc_getsymbol(rc, silk_model_stereo_s2) + 3 * (n / 5);
        ws[0] = opus_rc_getsymbol(rc, silk_model_stereo_s3);
        wi[1] = opus_rc_getsymbol(rc, silk_model_stereo_s2) + 3 * (n % 5);
        ws[1] = opus_rc_getsymbol(rc, silk_model_stereo_s3);
        for (i = 0; i < 2; i++)
            w[i] = silk_stereo_weights[wi[i]] +
                   (((silk_stereo_weights[wi[i] + 1] - silk_stereo_weights[wi[i]]) * 6554) >> 16)
                    * (ws[i]*2 + 1);
        s->stereo_weights[0] = (w[0] - w[1]) / 8192.0;
        s->stereo_weights[1] = w[1]          / 8192.0;
        s->midonly = active1 ? 0 : opus_rc_getsymbol(rc, silk_model_mid_only);
    }
    if (!active) {
        qoffset_high = opus_rc_getsymbol(rc, silk_model_frame_type_inactive);
        voiced = 0;
    } else {
        int type = opus_rc_getsymbol(rc, silk_model_frame_type_active);
        qoffset_high = type & 1;
        voiced = type >> 1;
    }
    for (i = 0; i < s->subframes; i++) {
        int log_gain;
        int ipart, fpart, lingain;
        if (i == 0 && (frame_num == 0 || !frame->coded)) {
            int x = opus_rc_getsymbol(rc, silk_model_gain_highbits[active + voiced]);
            log_gain = (x<<3) | opus_rc_getsymbol(rc, silk_model_gain_lowbits);
            if (frame->coded)
                log_gain = FFMAX(log_gain, frame->log_gain - 16);
        } else {
            int delta_gain = opus_rc_getsymbol(rc, silk_model_gain_delta);
            log_gain = av_clip(FFMAX((delta_gain<<1) - 16,
                                     frame->log_gain + delta_gain - 4), 0, 63);
        }
        frame->log_gain = log_gain;
        log_gain = (log_gain * 0x1D1C71 >> 16) + 2090;
        ipart = log_gain >> 7;
        fpart = log_gain & 127;
        lingain = (1 << ipart) + ((-174 * fpart * (128-fpart) >>16) + fpart) * ((1<<ipart) >> 7);
        sf[i].gain = lingain / 65536.0f;
    }
    silk_decode_lpc(s, frame, rc, lpc_leadin, lpc_body, &order, &has_lpc_leadin, voiced);
    if (voiced) {
        int lag_absolute = (!frame_num || !frame->prev_voiced);
        int primarylag;
        int ltpfilter;
        const int8_t * offsets;
        if (!lag_absolute) {
            int delta = opus_rc_getsymbol(rc, silk_model_pitch_delta);
            if (delta)
                primarylag = frame->primarylag + delta - 9;
            else
                lag_absolute = 1;
        }
        if (lag_absolute) {
            int highbits, lowbits;
            const uint16_t *model[] = {
                silk_model_pitch_lowbits_nb, silk_model_pitch_lowbits_mb,
                silk_model_pitch_lowbits_wb
            };
            highbits = opus_rc_getsymbol(rc, silk_model_pitch_highbits);
            lowbits  = opus_rc_getsymbol(rc, model[s->bandwidth]);
            primarylag = silk_pitch_min_lag[s->bandwidth] +
                         highbits*silk_pitch_scale[s->bandwidth] + lowbits;
        }
        frame->primarylag = primarylag;
        if (s->subframes == 2)
            offsets = (s->bandwidth == OPUS_BANDWIDTH_NARROWBAND)
                     ? silk_pitch_offset_nb10ms[opus_rc_getsymbol(rc,
                                                silk_model_pitch_contour_nb10ms)]
                     : silk_pitch_offset_mbwb10ms[opus_rc_getsymbol(rc,
                                                silk_model_pitch_contour_mbwb10ms)];
        else
            offsets = (s->bandwidth == OPUS_BANDWIDTH_NARROWBAND)
                     ? silk_pitch_offset_nb20ms[opus_rc_getsymbol(rc,
                                                silk_model_pitch_contour_nb20ms)]
                     : silk_pitch_offset_mbwb20ms[opus_rc_getsymbol(rc,
                                                silk_model_pitch_contour_mbwb20ms)];
        for (i = 0; i < s->subframes; i++)
            sf[i].pitchlag = av_clip(primarylag + offsets[i],
                                     silk_pitch_min_lag[s->bandwidth],
                                     silk_pitch_max_lag[s->bandwidth]);
        ltpfilter = opus_rc_getsymbol(rc, silk_model_ltp_filter);
        for (i = 0; i < s->subframes; i++) {
            int index, j;
            const uint16_t *filter_sel[] = {
                silk_model_ltp_filter0_sel, silk_model_ltp_filter1_sel,
                silk_model_ltp_filter2_sel
            };
            const int8_t (*filter_taps[])[5] = {
                silk_ltp_filter0_taps, silk_ltp_filter1_taps, silk_ltp_filter2_taps
            };
            index = opus_rc_getsymbol(rc, filter_sel[ltpfilter]);
            for (j = 0; j < 5; j++)
                sf[i].ltptaps[j] = filter_taps[ltpfilter][index][j] / 128.0f;
        }
    }
    if (voiced && frame_num == 0)
        ltpscale = silk_ltp_scale_factor[opus_rc_getsymbol(rc,
                                         silk_model_ltp_scale_index)] / 16384.0f;
    else ltpscale = 15565.0f/16384.0f;
    silk_decode_excitation(s, rc, residual + SILK_MAX_LAG, qoffset_high,
                           active, voiced);
    if (s->output_channels == channel)
        return;
    for (i = 0; i < s->subframes; i++) {
        const float * lpc_coeff = (i < 2 && has_lpc_leadin) ? lpc_leadin : lpc_body;
        float *dst    = frame->output      + SILK_HISTORY + i * s->sflength;
        float *resptr = residual           + SILK_MAX_LAG + i * s->sflength;
        float *lpc    = frame->lpc_history + SILK_HISTORY + i * s->sflength;
        float sum;
        int j, k;
        if (voiced) {
            int out_end;
            float scale;
            if (i < 2 || s->nlsf_interp_factor == 4) {
                out_end = -i * s->sflength;
                scale   = ltpscale;
            } else {
                out_end = -(i - 2) * s->sflength;
                scale   = 1.0f;
            }
            for (j = - sf[i].pitchlag - LTP_ORDER/2; j < out_end; j++) {
                sum = dst[j];
                for (k = 0; k < order; k++)
                    sum -= lpc_coeff[k] * dst[j - k - 1];
                resptr[j] = av_clipf(sum, -1.0f, 1.0f) * scale / sf[i].gain;
            }
            if (out_end) {
                float rescale = sf[i-1].gain / sf[i].gain;
                for (j = out_end; j < 0; j++)
                    resptr[j] *= rescale;
            }
            for (j = 0; j < s->sflength; j++) {
                sum = resptr[j];
                for (k = 0; k < LTP_ORDER; k++)
                    sum += sf[i].ltptaps[k] * resptr[j - sf[i].pitchlag + LTP_ORDER/2 - k];
                resptr[j] = sum;
            }
        }
        for (j = 0; j < s->sflength; j++) {
            sum = resptr[j] * sf[i].gain;
            for (k = 1; k <= order; k++)
                sum += lpc_coeff[k - 1] * lpc[j - k];
            lpc[j] = sum;
            dst[j] = av_clipf(sum, -1.0f, 1.0f);
        }
    }
    frame->prev_voiced = voiced;
    memmove(frame->lpc_history, frame->lpc_history + s->flength, SILK_HISTORY * sizeof(float));
    memmove(frame->output,      frame->output      + s->flength, SILK_HISTORY * sizeof(float));
    frame->coded = 1;
}
['static void silk_decode_frame(SilkContext *s, OpusRangeCoder *rc,\n                              int frame_num, int channel, int coded_channels, int active, int active1)\n{\n    int voiced;\n    int qoffset_high;\n    int order;\n    float lpc_leadin[16], lpc_body[16], residual[SILK_MAX_LAG + SILK_HISTORY];\n    int has_lpc_leadin;\n    float ltpscale;\n    struct {\n        float gain;\n        int pitchlag;\n        float ltptaps[5];\n    } sf[4];\n    SilkFrame * const frame = s->frame + channel;\n    int i;\n    if (coded_channels == 2 && channel == 0) {\n        int n, wi[2], ws[2], w[2];\n        n     = opus_rc_getsymbol(rc, silk_model_stereo_s1);\n        wi[0] = opus_rc_getsymbol(rc, silk_model_stereo_s2) + 3 * (n / 5);\n        ws[0] = opus_rc_getsymbol(rc, silk_model_stereo_s3);\n        wi[1] = opus_rc_getsymbol(rc, silk_model_stereo_s2) + 3 * (n % 5);\n        ws[1] = opus_rc_getsymbol(rc, silk_model_stereo_s3);\n        for (i = 0; i < 2; i++)\n            w[i] = silk_stereo_weights[wi[i]] +\n                   (((silk_stereo_weights[wi[i] + 1] - silk_stereo_weights[wi[i]]) * 6554) >> 16)\n                    * (ws[i]*2 + 1);\n        s->stereo_weights[0] = (w[0] - w[1]) / 8192.0;\n        s->stereo_weights[1] = w[1]          / 8192.0;\n        s->midonly = active1 ? 0 : opus_rc_getsymbol(rc, silk_model_mid_only);\n    }\n    if (!active) {\n        qoffset_high = opus_rc_getsymbol(rc, silk_model_frame_type_inactive);\n        voiced = 0;\n    } else {\n        int type = opus_rc_getsymbol(rc, silk_model_frame_type_active);\n        qoffset_high = type & 1;\n        voiced = type >> 1;\n    }\n    for (i = 0; i < s->subframes; i++) {\n        int log_gain;\n        int ipart, fpart, lingain;\n        if (i == 0 && (frame_num == 0 || !frame->coded)) {\n            int x = opus_rc_getsymbol(rc, silk_model_gain_highbits[active + voiced]);\n            log_gain = (x<<3) | opus_rc_getsymbol(rc, silk_model_gain_lowbits);\n            if (frame->coded)\n                log_gain = FFMAX(log_gain, frame->log_gain - 16);\n        } else {\n            int delta_gain = opus_rc_getsymbol(rc, silk_model_gain_delta);\n            log_gain = av_clip(FFMAX((delta_gain<<1) - 16,\n                                     frame->log_gain + delta_gain - 4), 0, 63);\n        }\n        frame->log_gain = log_gain;\n        log_gain = (log_gain * 0x1D1C71 >> 16) + 2090;\n        ipart = log_gain >> 7;\n        fpart = log_gain & 127;\n        lingain = (1 << ipart) + ((-174 * fpart * (128-fpart) >>16) + fpart) * ((1<<ipart) >> 7);\n        sf[i].gain = lingain / 65536.0f;\n    }\n    silk_decode_lpc(s, frame, rc, lpc_leadin, lpc_body, &order, &has_lpc_leadin, voiced);\n    if (voiced) {\n        int lag_absolute = (!frame_num || !frame->prev_voiced);\n        int primarylag;\n        int ltpfilter;\n        const int8_t * offsets;\n        if (!lag_absolute) {\n            int delta = opus_rc_getsymbol(rc, silk_model_pitch_delta);\n            if (delta)\n                primarylag = frame->primarylag + delta - 9;\n            else\n                lag_absolute = 1;\n        }\n        if (lag_absolute) {\n            int highbits, lowbits;\n            const uint16_t *model[] = {\n                silk_model_pitch_lowbits_nb, silk_model_pitch_lowbits_mb,\n                silk_model_pitch_lowbits_wb\n            };\n            highbits = opus_rc_getsymbol(rc, silk_model_pitch_highbits);\n            lowbits  = opus_rc_getsymbol(rc, model[s->bandwidth]);\n            primarylag = silk_pitch_min_lag[s->bandwidth] +\n                         highbits*silk_pitch_scale[s->bandwidth] + lowbits;\n        }\n        frame->primarylag = primarylag;\n        if (s->subframes == 2)\n            offsets = (s->bandwidth == OPUS_BANDWIDTH_NARROWBAND)\n                     ? silk_pitch_offset_nb10ms[opus_rc_getsymbol(rc,\n                                                silk_model_pitch_contour_nb10ms)]\n                     : silk_pitch_offset_mbwb10ms[opus_rc_getsymbol(rc,\n                                                silk_model_pitch_contour_mbwb10ms)];\n        else\n            offsets = (s->bandwidth == OPUS_BANDWIDTH_NARROWBAND)\n                     ? silk_pitch_offset_nb20ms[opus_rc_getsymbol(rc,\n                                                silk_model_pitch_contour_nb20ms)]\n                     : silk_pitch_offset_mbwb20ms[opus_rc_getsymbol(rc,\n                                                silk_model_pitch_contour_mbwb20ms)];\n        for (i = 0; i < s->subframes; i++)\n            sf[i].pitchlag = av_clip(primarylag + offsets[i],\n                                     silk_pitch_min_lag[s->bandwidth],\n                                     silk_pitch_max_lag[s->bandwidth]);\n        ltpfilter = opus_rc_getsymbol(rc, silk_model_ltp_filter);\n        for (i = 0; i < s->subframes; i++) {\n            int index, j;\n            const uint16_t *filter_sel[] = {\n                silk_model_ltp_filter0_sel, silk_model_ltp_filter1_sel,\n                silk_model_ltp_filter2_sel\n            };\n            const int8_t (*filter_taps[])[5] = {\n                silk_ltp_filter0_taps, silk_ltp_filter1_taps, silk_ltp_filter2_taps\n            };\n            index = opus_rc_getsymbol(rc, filter_sel[ltpfilter]);\n            for (j = 0; j < 5; j++)\n                sf[i].ltptaps[j] = filter_taps[ltpfilter][index][j] / 128.0f;\n        }\n    }\n    if (voiced && frame_num == 0)\n        ltpscale = silk_ltp_scale_factor[opus_rc_getsymbol(rc,\n                                         silk_model_ltp_scale_index)] / 16384.0f;\n    else ltpscale = 15565.0f/16384.0f;\n    silk_decode_excitation(s, rc, residual + SILK_MAX_LAG, qoffset_high,\n                           active, voiced);\n    if (s->output_channels == channel)\n        return;\n    for (i = 0; i < s->subframes; i++) {\n        const float * lpc_coeff = (i < 2 && has_lpc_leadin) ? lpc_leadin : lpc_body;\n        float *dst    = frame->output      + SILK_HISTORY + i * s->sflength;\n        float *resptr = residual           + SILK_MAX_LAG + i * s->sflength;\n        float *lpc    = frame->lpc_history + SILK_HISTORY + i * s->sflength;\n        float sum;\n        int j, k;\n        if (voiced) {\n            int out_end;\n            float scale;\n            if (i < 2 || s->nlsf_interp_factor == 4) {\n                out_end = -i * s->sflength;\n                scale   = ltpscale;\n            } else {\n                out_end = -(i - 2) * s->sflength;\n                scale   = 1.0f;\n            }\n            for (j = - sf[i].pitchlag - LTP_ORDER/2; j < out_end; j++) {\n                sum = dst[j];\n                for (k = 0; k < order; k++)\n                    sum -= lpc_coeff[k] * dst[j - k - 1];\n                resptr[j] = av_clipf(sum, -1.0f, 1.0f) * scale / sf[i].gain;\n            }\n            if (out_end) {\n                float rescale = sf[i-1].gain / sf[i].gain;\n                for (j = out_end; j < 0; j++)\n                    resptr[j] *= rescale;\n            }\n            for (j = 0; j < s->sflength; j++) {\n                sum = resptr[j];\n                for (k = 0; k < LTP_ORDER; k++)\n                    sum += sf[i].ltptaps[k] * resptr[j - sf[i].pitchlag + LTP_ORDER/2 - k];\n                resptr[j] = sum;\n            }\n        }\n        for (j = 0; j < s->sflength; j++) {\n            sum = resptr[j] * sf[i].gain;\n            for (k = 1; k <= order; k++)\n                sum += lpc_coeff[k - 1] * lpc[j - k];\n            lpc[j] = sum;\n            dst[j] = av_clipf(sum, -1.0f, 1.0f);\n        }\n    }\n    frame->prev_voiced = voiced;\n    memmove(frame->lpc_history, frame->lpc_history + s->flength, SILK_HISTORY * sizeof(float));\n    memmove(frame->output,      frame->output      + s->flength, SILK_HISTORY * sizeof(float));\n    frame->coded = 1;\n}']