avcodec/hevcdec: Remove redundant context_initialized

All contexts are always initialized during init, regardless
of whether frame threading is in use or not.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-06-29 13:14:39 +02:00
parent 9a167a15c7
commit a3b833c3ea
2 changed files with 0 additions and 8 deletions

View File

@ -3679,7 +3679,6 @@ static av_cold int hevc_init_context(AVCodecContext *avctx)
ff_bswapdsp_init(&s->bdsp);
s->dovi_ctx.logctx = avctx;
s->context_initialized = 1;
s->eos = 0;
ff_hevc_reset_sei(&s->sei);
@ -3699,12 +3698,6 @@ static int hevc_update_thread_context(AVCodecContext *dst,
HEVCContext *s0 = src->priv_data;
int i, ret;
if (!s->context_initialized) {
ret = hevc_init_context(dst);
if (ret < 0)
return ret;
}
for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {
ff_hevc_unref_frame(s, &s->DPB[i], ~0);
if (s0->DPB[i].frame->buf[0]) {

View File

@ -563,7 +563,6 @@ typedef struct HEVCContext {
// type of the first VCL NAL of the current frame
enum HEVCNALUnitType first_nal_type;
uint8_t context_initialized;
int is_nalff; ///< this flag is != 0 if bitstream is encapsulated
///< as a format defined in 14496-15
int apply_defdispwin;