]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/xbmenc.c
fft-test: Drop unnecessary pointer indirection for context structs
[ffmpeg] / libavcodec / xbmenc.c
index e12debe033d18e01ee3db0ada60f14784807cd12..517e569a60ab8fefe7e47649e3297de0c2f5d7a7 100644 (file)
@@ -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"),
 };