Browse Source

avcodec/hevcdec: keep closed captions in sync between multiple thread contexts

Based on h264 code.

Reviewed-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
tags/n4.3
James Almer 6 years ago
parent
commit
231ffd7e63
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      libavcodec/hevcdec.c

+ 7
- 0
libavcodec/hevcdec.c View File

@@ -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;


Loading…
Cancel
Save