From 039ea9ec7b33bf9ae20efe36747be4712c6833f2 Mon Sep 17 00:00:00 2001 From: James Almer Date: Tue, 16 Mar 2021 12:01:32 -0300 Subject: [PATCH] avcodec/encode: silence a deprecation warning about av_init_packet() No need to adapt this code as it will be removed long before av_init_packet() Signed-off-by: James Almer --- libavcodec/encode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/encode.c b/libavcodec/encode.c index 63453b7688..a93bb3ccf7 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -462,7 +462,9 @@ static int compat_encode(AVCodecContext *avctx, AVPacket *avpkt, av_buffer_unref(&avpkt->buf); avpkt->buf = user_pkt.buf; avpkt->data = user_pkt.data; +FF_DISABLE_DEPRECATION_WARNINGS av_init_packet(&user_pkt); +FF_ENABLE_DEPRECATION_WARNINGS } else { av_log(avctx, AV_LOG_ERROR, "Provided packet is too small, needs to be %d\n", avpkt->size); av_packet_unref(avpkt);