aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-02-24 11:51:09 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-02-27 15:30:12 +0100
commit802e4f4a53b11eeb0b28d7e74ab8d655ca894a17 (patch)
tree2449fe9ba8aae0378f826724eb9d7a71739e5130
parent57d892bd7b22ecf7e29a394c95dc19487cb84dbb (diff)
downloadffmpeg-802e4f4a53b11eeb0b28d7e74ab8d655ca894a17.tar.gz
avcodec/proresdec: Disable HWAccel at compile-time when possible
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/proresdec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
index 75cc2dcb6a..18cfc25279 100644
--- a/libavcodec/proresdec.c
+++ b/libavcodec/proresdec.c
@@ -254,6 +254,7 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
if (pix_fmt != ctx->pix_fmt) {
#define HWACCEL_MAX (CONFIG_PRORES_VIDEOTOOLBOX_HWACCEL)
+#if HWACCEL_MAX
enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmtp = pix_fmts;
int ret;
@@ -269,6 +270,9 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
return ret;
avctx->pix_fmt = ret;
+#else
+ avctx->pix_fmt = ctx->pix_fmt = pix_fmt;
+#endif
}
ctx->frame->color_primaries = buf[14];
@@ -789,7 +793,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
return ret;
ff_thread_finish_setup(avctx);
- if (avctx->hwaccel) {
+ if (HWACCEL_MAX && avctx->hwaccel) {
const FFHWAccel *hwaccel = ffhwaccel(avctx->hwaccel);
ret = hwaccel->start_frame(avctx, NULL, 0);
if (ret < 0)
@@ -862,10 +866,12 @@ const FFCodec ff_prores_decoder = {
UPDATE_THREAD_CONTEXT(update_thread_context),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
.p.profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
+#if HWACCEL_MAX
.hw_configs = (const AVCodecHWConfigInternal *const []) {
#if CONFIG_PRORES_VIDEOTOOLBOX_HWACCEL
HWACCEL_VIDEOTOOLBOX(prores),
#endif
NULL
},
+#endif
};