aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2024-02-19 12:46:21 +0100
committerAnton Khirnov <anton@khirnov.net>2024-03-08 07:37:56 +0100
commit0b7aefe698bca3b01861ebbcc415ca5b17b5051f (patch)
tree28d85789b4c7b1ec33b0e1156a79fd10139e4839 /libavcodec
parent133cbbe31e7278a13c7603e0bc367b806204d733 (diff)
downloadffmpeg-0b7aefe698bca3b01861ebbcc415ca5b17b5051f.tar.gz
avcodec/libdav1d: respect side data preference
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libdav1d.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index 79478ae893..fdc87d396c 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -541,8 +541,9 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
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;