Revision 77a78e9b libavcodec/flacenc.c

View differences:

libavcodec/flacenc.c
211 211
    int freq = avctx->sample_rate;
212 212
    int channels = avctx->channels;
213 213
    FlacEncodeContext *s = avctx->priv_data;
214
    int i, level;
214
    int i, level, ret;
215 215
    uint8_t *streaminfo;
216 216

  
217 217
    s->avctx = avctx;
218 218

  
219
    ff_lpc_init(&s->lpc_ctx);
220

  
221 219
    if (avctx->sample_fmt != AV_SAMPLE_FMT_S16)
222 220
        return -1;
223 221

  
......
438 436
    if (!avctx->coded_frame)
439 437
        return AVERROR(ENOMEM);
440 438

  
439
    ret = ff_lpc_init(&s->lpc_ctx, avctx->frame_size,
440
                      s->options.max_prediction_order, AV_LPC_TYPE_LEVINSON);
441

  
441 442
    dprint_compression_options(s);
442 443

  
443
    return 0;
444
    return ret;
444 445
}
445 446

  
446 447

  
......
1316 1317
    if (avctx->priv_data) {
1317 1318
        FlacEncodeContext *s = avctx->priv_data;
1318 1319
        av_freep(&s->md5ctx);
1320
        ff_lpc_end(&s->lpc_ctx);
1319 1321
    }
1320 1322
    av_freep(&avctx->extradata);
1321 1323
    avctx->extradata_size = 0;

Also available in: Unified diff