[FFmpeg-devel] [PATCH 10/29] avcodec/av1dec: respect side data preference

Anton Khirnov anton at khirnov.net
Mon Mar 4 15:06:25 EET 2024


From: Niklas Haas <git at haasn.dev>

---
 libavcodec/av1dec.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 704b9d6298..af80ee0b17 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -954,8 +954,9 @@ static int export_itut_t35(AVCodecContext *avctx, AVFrame *frame,
             if (!ret)
                 break;
 
-            if (!av_frame_new_side_data_from_buf(frame, AV_FRAME_DATA_A53_CC, buf))
-                av_buffer_unref(&buf);
+            ret = ff_frame_new_side_data_from_buf(avctx, frame, AV_FRAME_DATA_A53_CC, &buf, NULL);
+            if (ret < 0)
+                return ret;
 
             avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS;
             break;
-- 
2.43.0



More information about the ffmpeg-devel mailing list