X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fxbmenc.c;h=517e569a60ab8fefe7e47649e3297de0c2f5d7a7;hb=7288b345850792430302a8f85a4b29140b770497;hp=e12debe033d18e01ee3db0ada60f14784807cd12;hpb=d5c62122a7b26704bf867a1262df358623bf5edf;p=ffmpeg diff --git a/libavcodec/xbmenc.c b/libavcodec/xbmenc.c index e12debe033d..517e569a60a 100644 --- a/libavcodec/xbmenc.c +++ b/libavcodec/xbmenc.c @@ -26,7 +26,7 @@ static av_cold int xbm_encode_init(AVCodecContext *avctx) { - avctx->coded_frame = avcodec_alloc_frame(); + avctx->coded_frame = av_frame_alloc(); if (!avctx->coded_frame) return AVERROR(ENOMEM); avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; @@ -69,13 +69,14 @@ static int xbm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, static av_cold int xbm_encode_close(AVCodecContext *avctx) { - av_freep(&avctx->coded_frame); + av_frame_free(&avctx->coded_frame); return 0; } AVCodec ff_xbm_encoder = { .name = "xbm", + .long_name = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_XBM, .init = xbm_encode_init, @@ -83,5 +84,4 @@ AVCodec ff_xbm_encoder = { .close = xbm_encode_close, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MONOWHITE, AV_PIX_FMT_NONE }, - .long_name = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"), };