History

avcodec/librav1e: Don't unnecessarily create new references

Andreas Rheinhardt committed 2 years ago

Commit 3fd047e1 parent c89f6ae1 file · +2 −6Browse files

Unified · Split

libavcodec/librav1e.c+2−6
@@ -472,12 +472,8 @@ static int librav1e_receive_packet(AVCodecContext *avctx, AVPacket *pkt) · 471 unmodified lines
472472
473473 if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) {
474474 fd->frame_opaque = frame->opaque;
475− ret = av_buffer_replace(&fd->frame_opaque_ref, frame->opaque_ref);
476− if (ret < 0) {
477− frame_data_free(fd);
478− av_frame_unref(frame);
479− return ret;
480− }
475+ fd->frame_opaque_ref = frame->opaque_ref;
476+ frame->opaque_ref = NULL;
481477 }
482478
483479 rframe = rav1e_frame_new(ctx->ctx);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t