aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-06-27 18:49:01 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-12-01 11:00:40 +0100
commitde5891d3712cca5acde9c1c0dc9500ff94ac3af2 (patch)
tree39c2d4d8e3a25d9ecf7fe2bcc24cb93e976b485e /libavcodec/h264_slice.c
parent33239ebd076d936d51d35f47b3f9837987472b5a (diff)
downloadffmpeg-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.c21
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)