aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/proresdec2.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-01 19:44:22 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-07 09:50:29 +0200
commite35dfe864d8fb1ee9e28684a5a93e4b75d0d8092 (patch)
treebbf1004fe094653f8dc00048137f17cc4cb06ab6 /libavcodec/proresdec2.c
parentc48cc9c6e90bc8ca0304bd57cb77f7a689f83391 (diff)
downloadffmpeg-e35dfe864d8fb1ee9e28684a5a93e4b75d0d8092.tar.gz
avcodec/avcodec: Add FFHWAccel, hide internals of AVHWAccel
This commit is the AVHWAccel analogue of commit 20f972701806be20a77f808db332d9489343bb78: It moves the private fields of AVHWAccel to a new struct FFHWAccel extending AVHWAccel in an internal header (namely hwaccel_internal.h). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/proresdec2.c')
-rw-r--r--libavcodec/proresdec2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index b86614adc0..ae5838eca4 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -37,6 +37,7 @@
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
+#include "hwaccel_internal.h"
#include "hwconfig.h"
#include "idctdsp.h"
#include "profiles.h"
@@ -804,13 +805,14 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
ff_thread_finish_setup(avctx);
if (avctx->hwaccel) {
- ret = avctx->hwaccel->start_frame(avctx, NULL, 0);
+ const FFHWAccel *hwaccel = ffhwaccel(avctx->hwaccel);
+ ret = hwaccel->start_frame(avctx, NULL, 0);
if (ret < 0)
return ret;
- ret = avctx->hwaccel->decode_slice(avctx, avpkt->data, avpkt->size);
+ ret = hwaccel->decode_slice(avctx, avpkt->data, avpkt->size);
if (ret < 0)
return ret;
- ret = avctx->hwaccel->end_frame(avctx);
+ ret = hwaccel->end_frame(avctx);
if (ret < 0)
return ret;
goto finish;