mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
avcodec/librav1e: Don't unnecessarily create new references
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
c89f6ae689
commit
3fd047ee30
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user