diff options
author | James Almer <jamrial@gmail.com> | 2019-11-19 19:42:48 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-11-19 19:42:48 -0300 |
commit | fdf46b4a6b36dd8551adc29c455326b1a13b4acb (patch) | |
tree | ac06329147f14a77ed8574994fde82d8b78641c3 /libavcodec | |
parent | f18a5efb5222ed8a48b4ba58ba59e2c7190f297a (diff) | |
download | ffmpeg-fdf46b4a6b36dd8551adc29c455326b1a13b4acb.tar.gz |
avcodec/amfnec: allocate packets using av_new_packet()
This ensures they will be reference counted, as required by the AVCodec.receive_packet()
API.
Should fix ticket #8386.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/amfenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c index f66b95645e..876fddd2b6 100644 --- a/libavcodec/amfenc.c +++ b/libavcodec/amfenc.c @@ -451,7 +451,7 @@ static int amf_copy_buffer(AVCodecContext *avctx, AVPacket *pkt, AMFBuffer *buff int64_t timestamp = AV_NOPTS_VALUE; int64_t size = buffer->pVtbl->GetSize(buffer); - if ((ret = ff_alloc_packet2(avctx, pkt, size, 0)) < 0) { + if ((ret = av_new_packet(pkt, size)) < 0) { return ret; } memcpy(pkt->data, buffer->pVtbl->GetNative(buffer), size); |