From: James Almer <jamrial@gmail.com> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/hevc/hevcdec: simplify creating a new reference to HDR10 side data Date: Tue, 4 Feb 2025 18:12:56 -0300 Message-ID: <20250204211256.10228-2-jamrial@gmail.com> (raw) In-Reply-To: <20250204211256.10228-1-jamrial@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/hevc/hevcdec.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index cf4062c75c..24d801c39f 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -3081,16 +3081,11 @@ static int set_side_data(HEVCContext *s) } if (s->sei.common.dynamic_hdr_plus.info) { - AVBufferRef *info_ref = av_buffer_ref(s->sei.common.dynamic_hdr_plus.info); - if (!info_ref) - return AVERROR(ENOMEM); - ret = ff_frame_new_side_data_from_buf(s->avctx, out, AV_FRAME_DATA_DYNAMIC_HDR_PLUS, - &info_ref, 0); - if (ret < 0) { - av_buffer_unref(&info_ref); + &s->sei.common.dynamic_hdr_plus.info, + AV_FRAME_SIDE_DATA_FLAG_NEW_REF); + if (ret < 0) return ret; - } } if (s->rpu_buf) { -- 2.48.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2025-02-04 21:13 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-02-04 21:12 [FFmpeg-devel] [PATCH 1/2] avcodec/decode: make ff_frame_new_side_data_from_buf behave like the function it's a wrapper for James Almer 2025-02-04 21:12 ` James Almer [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20250204211256.10228-2-jamrial@gmail.com \ --to=jamrial@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git