static av_cold int xface_encode_init(AVCodecContext *avctx)
{
- avctx->coded_frame = av_frame_alloc();
- if (!avctx->coded_frame)
- return AVERROR(ENOMEM);
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
return 0;
intbuf[i++] = r + XFACE_FIRST_PRINT;
}
- if ((ret = ff_alloc_packet2(avctx, pkt, i+2)) < 0)
+ if ((ret = ff_alloc_packet2(avctx, pkt, i+2, 0)) < 0)
return ret;
/* revert the number, and close the buffer */
static av_cold int xface_encode_close(AVCodecContext *avctx)
{
- av_frame_free(&avctx->coded_frame);
-
return 0;
}