Signed-off-by: James Almer <jamr...@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-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to