proresdec: call ff_get_format if the interlacing changes

Decoders need to track all state that hwaccels may be intersted in,
and trigger a reconfiguration if it changes.
This commit is contained in:
Lynne
2025-11-23 20:00:21 +01:00
parent 56dea1a9e8
commit 8c0314d44a

View File

@@ -189,6 +189,7 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
int version; int version;
const uint8_t *ptr; const uint8_t *ptr;
enum AVPixelFormat pix_fmt; enum AVPixelFormat pix_fmt;
int old_frame_type = ctx->frame_type;
hdr_size = AV_RB16(buf); hdr_size = AV_RB16(buf);
ff_dlog(avctx, "header size %d\n", hdr_size); 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) #define HWACCEL_MAX (CONFIG_PRORES_VIDEOTOOLBOX_HWACCEL + CONFIG_PRORES_VULKAN_HWACCEL)
#if HWACCEL_MAX #if HWACCEL_MAX
enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmtp = pix_fmts; 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; ProresContext *cdst = dst->priv_data;
cdst->pix_fmt = csrc->pix_fmt; cdst->pix_fmt = csrc->pix_fmt;
cdst->frame_type = csrc->frame_type;
return 0; return 0;
} }