X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Flclenc.c;h=7387da4a65d22b0d496d7ade454194f88721e210;hb=caba19a5becce2e867fc0ff7c3466c57736f49ad;hp=bce1d537a28cd575d4393adf514c8e7893530bab;hpb=65b0f7ce08170dd2ca2998d42e0bd9f1cb82e76c;p=ffmpeg diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c index bce1d537a28..7387da4a65d 100644 --- a/libavcodec/lclenc.c +++ b/libavcodec/lclenc.c @@ -135,12 +135,12 @@ static av_cold int encode_init(AVCodecContext *avctx) if (!avctx->extradata) return AVERROR(ENOMEM); - avctx->coded_frame = av_frame_alloc(); - if (!avctx->coded_frame) - return AVERROR(ENOMEM); - +#if FF_API_CODED_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif c->compression = avctx->compression_level == FF_COMPRESSION_DEFAULT ? COMP_ZLIB_NORMAL : @@ -183,8 +183,6 @@ static av_cold int encode_end(AVCodecContext *avctx) av_freep(&avctx->extradata); deflateEnd(&c->zstream); - av_frame_free(&avctx->coded_frame); - return 0; }