diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-06-27 18:49:01 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-12-01 11:00:40 +0100 |
commit | de5891d3712cca5acde9c1c0dc9500ff94ac3af2 (patch) | |
tree | 39c2d4d8e3a25d9ecf7fe2bcc24cb93e976b485e /libavcodec/h264_slice.c | |
parent | 33239ebd076d936d51d35f47b3f9837987472b5a (diff) | |
download | ffmpeg-de5891d3712cca5acde9c1c0dc9500ff94ac3af2.tar.gz |
avcodec/h2645_sei: Factor updating H.2645 SEIs out
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r-- | libavcodec/h264_slice.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index a64fe145d3..35e2149b4f 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -434,29 +434,10 @@ int ff_h264_update_thread_context(AVCodecContext *dst, h->frame_recovered = h1->frame_recovered; - ret = av_buffer_replace(&h->sei.common.a53_caption.buf_ref, - h1->sei.common.a53_caption.buf_ref); + ret = ff_h264_sei_ctx_replace(&h->sei, &h1->sei); if (ret < 0) return ret; - for (unsigned i = 0; i < h->sei.common.unregistered.nb_buf_ref; i++) - av_buffer_unref(&h->sei.common.unregistered.buf_ref[i]); - h->sei.common.unregistered.nb_buf_ref = 0; - - if (h1->sei.common.unregistered.nb_buf_ref) { - ret = av_reallocp_array(&h->sei.common.unregistered.buf_ref, - h1->sei.common.unregistered.nb_buf_ref, - sizeof(*h->sei.common.unregistered.buf_ref)); - if (ret < 0) - return ret; - - for (unsigned i = 0; i < h1->sei.common.unregistered.nb_buf_ref; i++) { - h->sei.common.unregistered.buf_ref[i] = av_buffer_ref(h1->sei.common.unregistered.buf_ref[i]); - if (!h->sei.common.unregistered.buf_ref[i]) - return AVERROR(ENOMEM); - h->sei.common.unregistered.nb_buf_ref++; - } - } h->sei.common.unregistered.x264_build = h1->sei.common.unregistered.x264_build; if (!h->cur_pic_ptr) |