diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c index 5c6b505527..b971d17972 100644 --- a/libavcodec/proresdec.c +++ b/libavcodec/proresdec.c @@ -189,6 +189,7 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, int version; const uint8_t *ptr; enum AVPixelFormat pix_fmt; + int old_frame_type = ctx->frame_type; hdr_size = AV_RB16(buf); ff_dlog(avctx, "header size %d\n", hdr_size); @@ -251,7 +252,8 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, } } - if (pix_fmt != ctx->pix_fmt || dimensions_changed) { + if (pix_fmt != ctx->pix_fmt || dimensions_changed || + ctx->frame_type != old_frame_type) { #define HWACCEL_MAX (CONFIG_PRORES_VIDEOTOOLBOX_HWACCEL + CONFIG_PRORES_VULKAN_HWACCEL) #if HWACCEL_MAX enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmtp = pix_fmts; @@ -856,6 +858,7 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) ProresContext *cdst = dst->priv_data; cdst->pix_fmt = csrc->pix_fmt; + cdst->frame_type = csrc->frame_type; return 0; }