Lines Matching refs:avctx
36 static av_cold int cng_encode_close(AVCodecContext *avctx)
38 CNGContext *p = avctx->priv_data;
45 static av_cold int cng_encode_init(AVCodecContext *avctx)
47 CNGContext *p = avctx->priv_data;
50 if (avctx->channels != 1) {
51 av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
55 avctx->frame_size = 640;
57 if ((ret = ff_lpc_init(&p->lpc, avctx->frame_size, p->order, FF_LPC_TYPE_LEVINSON)) < 0)
59 p->samples32 = av_malloc_array(avctx->frame_size, sizeof(*p->samples32));
62 cng_encode_close(avctx);
69 static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
72 CNGContext *p = avctx->priv_data;
79 av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");