aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc/hevcdec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-06-01 16:24:00 +0200
committerAnton Khirnov <anton@khirnov.net>2024-06-11 17:39:35 +0200
commit07eb60c0da34d146b72064ec1f316d64a6ac7ebb (patch)
tree204a305dd77a8253fe223a4c57ed9392de877061 /libavcodec/hevc/hevcdec.c
parent01b379a93e05d86f7d889a848741f7e235560630 (diff)
downloadffmpeg-07eb60c0da34d146b72064ec1f316d64a6ac7ebb.tar.gz
lavc/hevcdec: only call export_stream_params_from_sei() once per frame
Not once per each slice header, as it makes no sense and may cause races with frame threading.
Diffstat (limited to 'libavcodec/hevc/hevcdec.c')
-rw-r--r--libavcodec/hevc/hevcdec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index dd3c188418..bf6e93ba1b 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -648,10 +648,6 @@ static int hls_slice_header(HEVCContext *s, GetBitContext *gb)
s->max_ra = INT_MAX;
}
- ret = export_stream_params_from_sei(s);
- if (ret < 0)
- return ret;
-
sh->dependent_slice_segment_flag = 0;
if (!sh->first_slice_in_pic_flag) {
int slice_address_length;
@@ -2965,6 +2961,10 @@ 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;