Revision 7101b185 libavcodec/alacenc.c

View differences:

libavcodec/alacenc.c
378 378
static av_cold int alac_encode_init(AVCodecContext *avctx)
379 379
{
380 380
    AlacEncodeContext *s    = avctx->priv_data;
381
    int ret;
381 382
    uint8_t *alac_extradata = av_mallocz(ALAC_EXTRADATA_SIZE+1);
382 383

  
383 384
    avctx->frame_size      = DEFAULT_FRAME_SIZE;
......
455 456
    avctx->coded_frame->key_frame = 1;
456 457

  
457 458
    s->avctx = avctx;
458
    ff_lpc_init(&s->lpc_ctx);
459
    ret = ff_lpc_init(&s->lpc_ctx, avctx->frame_size, s->max_prediction_order,
460
                      AV_LPC_TYPE_LEVINSON);
459 461

  
460
    return 0;
462
    return ret;
461 463
}
462 464

  
463 465
static int alac_encode_frame(AVCodecContext *avctx, uint8_t *frame,
......
513 515

  
514 516
static av_cold int alac_encode_close(AVCodecContext *avctx)
515 517
{
518
    AlacEncodeContext *s = avctx->priv_data;
519
    ff_lpc_end(&s->lpc_ctx);
516 520
    av_freep(&avctx->extradata);
517 521
    avctx->extradata_size = 0;
518 522
    av_freep(&avctx->coded_frame);

Also available in: Unified diff