[FFmpeg-cvslog] avcodec/hevcdec: keep closed captions in sync between multiple thread contexts
James Almer
git at videolan.org
Sat Dec 21 21:10:57 EET 2019
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Dec 20 14:05:42 2019 -0300| [231ffd7e6301e13431ebb3520827d60ac2a3eb64] | committer: James Almer
avcodec/hevcdec: keep closed captions in sync between multiple thread contexts
Based on h264 code.
Reviewed-by: Limin Wang <lance.lmwang at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=231ffd7e6301e13431ebb3520827d60ac2a3eb64
---
libavcodec/hevcdec.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index f8270b87c3..19b0cd815d 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -3463,6 +3463,13 @@ static int hevc_update_thread_context(AVCodecContext *dst,
s->max_ra = INT_MAX;
}
+ av_buffer_unref(&s->sei.a53_caption.buf_ref);
+ if (s0->sei.a53_caption.buf_ref) {
+ s->sei.a53_caption.buf_ref = av_buffer_ref(s0->sei.a53_caption.buf_ref);
+ if (!s->sei.a53_caption.buf_ref)
+ return AVERROR(ENOMEM);
+ }
+
s->sei.frame_packing = s0->sei.frame_packing;
s->sei.display_orientation = s0->sei.display_orientation;
s->sei.mastering_display = s0->sei.mastering_display;
More information about the ffmpeg-cvslog
mailing list