diff mbox series

[FFmpeg-devel,1/5] lavc/hevcdec: call export_stream_params_from_sei() before ff_get_buffer()

Message ID 20240626124337.14478-1-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,1/5] lavc/hevcdec: call export_stream_params_from_sei() before ff_get_buffer() | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov June 26, 2024, 12:43 p.m. UTC
So that correct values of color_trc are set on the allocated frame.
---
 libavcodec/hevc/hevcdec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index 1d2e53afc3..e80f2f28c7 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -2964,6 +2964,10 @@  static int hevc_frame_start(HEVCContext *s)
     if (pps->tiles_enabled_flag)
         s->local_ctx[0].end_of_tiles_x = pps->column_width[0] << sps->log2_ctb_size;
 
+    ret = export_stream_params_from_sei(s);
+    if (ret < 0)
+        return ret;
+
     ret = ff_hevc_set_new_ref(s, s->poc);
     if (ret < 0)
         goto fail;
@@ -2984,10 +2988,6 @@  static int hevc_frame_start(HEVCContext *s)
         !(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) &&
         !s->avctx->hwaccel;
 
-    ret = export_stream_params_from_sei(s);
-    if (ret < 0)
-        return ret;
-
     ret = set_side_data(s);
     if (ret < 0)
         goto fail;