Not once per each slice header, as it makes no sense and may cause races with frame threading.
Unified · Split
| @@ -648,10 +648,6 @@ static int hls_slice_header(HEVCContext *s, GetBitContext *gb) · 647 unmodified lines | |||
| 648 | s->max_ra = INT_MAX; | 648 | s->max_ra = INT_MAX; |
| 649 | } | 649 | } |
| 650 | 650 | ||
| 651 | ret = export_stream_params_from_sei(s); | ||
| 652 | if (ret < 0) | ||
| 653 | return ret; | ||
| 654 | |||
| 655 | sh->dependent_slice_segment_flag = 0; | 651 | sh->dependent_slice_segment_flag = 0; |
| 656 | if (!sh->first_slice_in_pic_flag) { | 652 | if (!sh->first_slice_in_pic_flag) { |
| 657 | int slice_address_length; | 653 | int slice_address_length; |
| @@ -2965,6 +2961,10 @@ static int hevc_frame_start(HEVCContext *s) · 2307 unmodified lines | |||
| 2965 | !(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && | 2961 | !(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && |
| 2966 | !s->avctx->hwaccel; | 2962 | !s->avctx->hwaccel; |
| 2967 | 2963 | ||
| 2964 | ret = export_stream_params_from_sei(s); | ||
| 2965 | if (ret < 0) | ||
| 2966 | return ret; | ||
| 2967 | |||
| 2968 | ret = set_side_data(s); | 2968 | ret = set_side_data(s); |
| 2969 | if (ret < 0) | 2969 | if (ret < 0) |
| 2970 | goto fail; | 2970 | goto fail; |