mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-05 22:40:09 +01:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user