summaryrefslogtreecommitdiff
path: root/libavcodec/amfenc.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-03-12 20:49:44 -0300
committerJames Almer <jamrial@gmail.com>2021-03-17 13:42:54 -0300
commitb615e8a7826daf9279bff9ee0b629840f05b218c (patch)
tree626d0c8292cc5b7a95face6fc9b7f2f5b4d9ffc7 /libavcodec/amfenc.c
parent8f1580c31a3cfb9994bda7b3914a97e09b9f1d48 (diff)
avcodec/amfenc: use AVCodecContext.get_encode_buffer()
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/amfenc.c')
-rw-r--r--libavcodec/amfenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c
index e234cfd354..fb23ed738c 100644
--- a/libavcodec/amfenc.c
+++ b/libavcodec/amfenc.c
@@ -452,7 +452,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 = av_new_packet(pkt, size)) < 0) {
+ if ((ret = ff_get_encode_buffer(avctx, pkt, size, 0)) < 0) {
return ret;
}
memcpy(pkt->data, buffer->pVtbl->GetNative(buffer), size);