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:
parent
1f32e91df6
commit
039ea9ec7b
@ -462,7 +462,9 @@ static int compat_encode(AVCodecContext *avctx, AVPacket *avpkt,
|
|||||||
av_buffer_unref(&avpkt->buf);
|
av_buffer_unref(&avpkt->buf);
|
||||||
avpkt->buf = user_pkt.buf;
|
avpkt->buf = user_pkt.buf;
|
||||||
avpkt->data = user_pkt.data;
|
avpkt->data = user_pkt.data;
|
||||||
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
av_init_packet(&user_pkt);
|
av_init_packet(&user_pkt);
|
||||||
|
FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
} else {
|
} else {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Provided packet is too small, needs to be %d\n", avpkt->size);
|
av_log(avctx, AV_LOG_ERROR, "Provided packet is too small, needs to be %d\n", avpkt->size);
|
||||||
av_packet_unref(avpkt);
|
av_packet_unref(avpkt);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user