aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-11-11 19:59:01 -0300
committerJames Almer <jamrial@gmail.com>2024-11-13 12:49:52 -0300
commit66014c79abb5a1e00fc43fb335840b2063e8adc4 (patch)
treeda73d032ff1fcec90c89b1693b629111b45455eb /libavcodec
parentedc7b675082e84b39cfaad61eb93d500f53a7db6 (diff)
downloadffmpeg-66014c79abb5a1e00fc43fb335840b2063e8adc4.tar.gz
avcodec/h2645_sei: move some common SEI syncing code to ff_h2645_sei_ctx_replace()
Instead of duplicating it across all supported decoders. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h2645_sei.c3
-rw-r--r--libavcodec/h264_slice.c2
-rw-r--r--libavcodec/hevc/hevcdec.c2
3 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/h2645_sei.c b/libavcodec/h2645_sei.c
index 62369dd37f..986d1d250a 100644
--- a/libavcodec/h2645_sei.c
+++ b/libavcodec/h2645_sei.c
@@ -556,6 +556,9 @@ int ff_h2645_sei_ctx_replace(H2645SEI *dst, const H2645SEI *src)
}
dst->aom_film_grain.enable = src->aom_film_grain.enable;
+ dst->mastering_display = src->mastering_display;
+ dst->content_light = src->content_light;
+
ff_refstruct_replace(&dst->film_grain_characteristics,
src->film_grain_characteristics);
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 84595b1a8b..08376ffa6d 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -442,8 +442,6 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
return ret;
h->sei.common.unregistered.x264_build = h1->sei.common.unregistered.x264_build;
- h->sei.common.mastering_display = h1->sei.common.mastering_display;
- h->sei.common.content_light = h1->sei.common.content_light;
if (!h->cur_pic_ptr)
return 0;
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index 19080255cb..fe8897fb6e 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -4003,8 +4003,6 @@ static int hevc_update_thread_context(AVCodecContext *dst,
s->sei.common.frame_packing = s0->sei.common.frame_packing;
s->sei.common.display_orientation = s0->sei.common.display_orientation;
s->sei.common.alternative_transfer = s0->sei.common.alternative_transfer;
- s->sei.common.mastering_display = s0->sei.common.mastering_display;
- s->sei.common.content_light = s0->sei.common.content_light;
s->sei.tdrdi = s0->sei.tdrdi;
return 0;