Revision 77a78e9b libavcodec/ra144enc.c

View differences:

libavcodec/ra144enc.c
36 36
static av_cold int ra144_encode_init(AVCodecContext * avctx)
37 37
{
38 38
    RA144Context *ractx;
39
    int ret;
39 40

  
40 41
    if (avctx->sample_fmt != AV_SAMPLE_FMT_S16) {
41 42
        av_log(avctx, AV_LOG_ERROR, "invalid sample format\n");
......
52 53
    ractx->lpc_coef[0] = ractx->lpc_tables[0];
53 54
    ractx->lpc_coef[1] = ractx->lpc_tables[1];
54 55
    ractx->avctx = avctx;
55
    ff_lpc_init(&ractx->lpc_ctx);
56
    ret = ff_lpc_init(&ractx->lpc_ctx, avctx->frame_size, LPC_ORDER,
57
                      AV_LPC_TYPE_LEVINSON);
58
    return ret;
59
}
60

  
61

  
62
static av_cold int ra144_encode_close(AVCodecContext *avctx)
63
{
64
    RA144Context *ractx = avctx->priv_data;
65
    ff_lpc_end(&ractx->lpc_ctx);
56 66
    return 0;
57 67
}
58 68

  
......
506 516
    sizeof(RA144Context),
507 517
    ra144_encode_init,
508 518
    ra144_encode_frame,
519
    ra144_encode_close,
509 520
    .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K) encoder"),
510 521
};

Also available in: Unified diff