diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-03-07 17:25:37 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-03-22 17:04:05 +0100 |
commit | 3fd047ee30574fd2dfd739cbb150f87c7225b81f (patch) | |
tree | 7ba50afaa3f120bc3c0064a5b7838e75ebfcc10a | |
parent | c89f6ae6899e0f3ffb4f51da1f1776ab16f5b3a0 (diff) | |
download | ffmpeg-3fd047ee30574fd2dfd739cbb150f87c7225b81f.tar.gz |
avcodec/librav1e: Don't unnecessarily create new references
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/librav1e.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/librav1e.c b/libavcodec/librav1e.c index dbd728a408..2a6d8bfbed 100644 --- a/libavcodec/librav1e.c +++ b/libavcodec/librav1e.c @@ -472,12 +472,8 @@ static int librav1e_receive_packet(AVCodecContext *avctx, AVPacket *pkt) if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { fd->frame_opaque = frame->opaque; - ret = av_buffer_replace(&fd->frame_opaque_ref, frame->opaque_ref); - if (ret < 0) { - frame_data_free(fd); - av_frame_unref(frame); - return ret; - } + fd->frame_opaque_ref = frame->opaque_ref; + frame->opaque_ref = NULL; } rframe = rav1e_frame_new(ctx->ctx); |