[FFmpeg-devel] [PATCH 21/29] avcodec/libdav1d: respect side data preference

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


From: Niklas Haas <git at haasn.dev>

Signed-off-by: Anton Khirnov <anton at khirnov.net>
---
 libavcodec/libdav1d.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index 78a5c63bf4..3714137ed0 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -561,8 +561,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
                 if (!res)
                     break;
 
-                if (!av_frame_new_side_data_from_buf(frame, AV_FRAME_DATA_A53_CC, buf))
-                    av_buffer_unref(&buf);
+                res = ff_frame_new_side_data_from_buf(c, frame, AV_FRAME_DATA_A53_CC, &buf, NULL);
+                if (res < 0)
+                    goto fail;
 
                 c->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS;
                 break;
-- 
2.43.0



More information about the ffmpeg-devel mailing list