Lines Matching refs:avctx
126 static av_cold int xface_encode_init(AVCodecContext *avctx)
128 avctx->coded_frame = av_frame_alloc();
129 if (!avctx->coded_frame)
131 avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
145 static int xface_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
148 XFaceContext *xface = avctx->priv_data;
157 if (avctx->width || avctx->height) {
158 if (avctx->width != XFACE_WIDTH || avctx->height != XFACE_HEIGHT) {
159 av_log(avctx, AV_LOG_ERROR,
161 avctx->width, avctx->height, XFACE_WIDTH, XFACE_HEIGHT);
165 avctx->width = XFACE_WIDTH;
166 avctx->height = XFACE_HEIGHT;
205 if ((ret = ff_alloc_packet2(avctx, pkt, i+2)) < 0)
221 static av_cold int xface_encode_close(AVCodecContext *avctx)
223 av_freep(&avctx->coded_frame);