diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 2319e76e4b..730d4f90fe 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -2235,6 +2235,8 @@ void ff_decode_internal_sync(AVCodecContext *dst, const AVCodecContext *src) const DecodeContext *src_dc = decode_ctx(src->internal); DecodeContext *dst_dc = decode_ctx(dst->internal); + dst_dc->initial_pict_type = src_dc->initial_pict_type; + dst_dc->intra_only_flag = src_dc->intra_only_flag; av_refstruct_replace(&dst_dc->lcevc, src_dc->lcevc); } diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 4ea5dd3698..abf0d5a199 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -115,10 +115,6 @@ typedef struct PerThreadContext { int hwaccel_threadsafe; atomic_int debug_threads; ///< Set if the FF_DEBUG_THREADS option is set. - - /// The following two fields have the same semantics as the DecodeContext field - int intra_only_flag; - enum AVPictureType initial_pict_type; } PerThreadContext; /** @@ -820,13 +816,6 @@ static av_cold int init_thread(PerThreadContext *p, int *threads_to_free, AVCodecContext *copy; int err; - p->initial_pict_type = AV_PICTURE_TYPE_NONE; - if (avctx->codec_descriptor->props & AV_CODEC_PROP_INTRA_ONLY) { - p->intra_only_flag = AV_FRAME_FLAG_KEY; - if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) - p->initial_pict_type = AV_PICTURE_TYPE_I; - } - atomic_init(&p->state, STATE_INPUT_READY); copy = av_memdup(avctx, sizeof(*avctx));