]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/encode: silence a deprecation warning about av_init_packet()
authorJames Almer <jamrial@gmail.com>
Tue, 16 Mar 2021 15:01:32 +0000 (12:01 -0300)
committerJames Almer <jamrial@gmail.com>
Wed, 17 Mar 2021 17:12:18 +0000 (14:12 -0300)
No need to adapt this code as it will be removed long before av_init_packet()

Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/encode.c

index 63453b7688b132e2d428741f9a9f4f9436eba317..a93bb3ccf78f1f974bf9aae3905f17b22fd03e7e 100644 (file)
@@ -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);