Browse Source

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>
tags/n4.4
James Almer 4 years ago
parent
commit
039ea9ec7b
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/encode.c

+ 2
- 0
libavcodec/encode.c 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);


Loading…
Cancel
Save