1
0
Fork 0

avcodec/librav1e: Don't unnecessarily create new references

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-03-07 17:25:37 +01:00
parent c89f6ae689
commit 3fd047ee30
1 changed files with 2 additions and 6 deletions

View File

@ -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);