[FFmpeg-cvslog] avcodec/av1dec: respect side data preference
Niklas Haas
git at videolan.org
Fri Mar 8 09:06:25 EET 2024
ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Sat Feb 17 21:39:13 2024 +0100| [01056078ed4d2aef0b880f686d5eb8fce0b823da] | committer: Anton Khirnov
avcodec/av1dec: respect side data preference
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=01056078ed4d2aef0b880f686d5eb8fce0b823da
---
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;
More information about the ffmpeg-cvslog
mailing list