X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fgif.c;h=7ac95d26c819726fb5c0efd8a76dee1e2bb9baad;hb=495eee01238b1282c6b61a021ee9fa5f42b6f108;hp=cf5d438a7283ac45b048a273d8fe5a0a87a1315c;hpb=db3e12a828553171f37c98119679316720e4caed;p=ffmpeg diff --git a/libavcodec/gif.c b/libavcodec/gif.c index cf5d438a728..7ac95d26c81 100644 --- a/libavcodec/gif.c +++ b/libavcodec/gif.c @@ -221,13 +221,12 @@ static av_cold int gif_encode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "GIF does not support resolutions above 65535x65535\n"); return AVERROR(EINVAL); } - - 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 s->transparent_index = -1; @@ -320,8 +319,6 @@ static int gif_encode_close(AVCodecContext *avctx) { GIFContext *s = avctx->priv_data; - av_frame_free(&avctx->coded_frame); - av_freep(&s->lzw); av_freep(&s->buf); av_frame_free(&s->last_frame);