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 <jamrial@gmail.com>
This commit is contained in:
James Almer 2021-03-16 12:01:32 -03:00
parent 1f32e91df6
commit 039ea9ec7b

View 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);