summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2024-02-19 12:46:21 +0100
committerAnton Khirnov <anton@khirnov.net>2024-03-04 14:03:17 +0100
commitedc5623d70dd9005a7646d7a76821b1bd3f6a3db (patch)
tree1da5bb4f265a15068fab3f461a61a992bbfc1a92
parent64d6aed96a7960ae8b393248f16bbb2821092197 (diff)
avcodec/libdav1d: respect side data preference
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavcodec/libdav1d.c5
1 files 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;