From ce7dbd0481f990e249c2a05f179228489d3062cf Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Wed, 30 Mar 2022 21:33:24 +0200 Subject: avcodec/codec_internal: Make FFCodec.decode use AVFrame* This increases type-safety by avoiding conversions from/through void*. It also avoids the boilerplate "AVFrame *frame = data;" line for non-subtitle decoders. Signed-off-by: Andreas Rheinhardt --- libavcodec/hapdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavcodec/hapdec.c') diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c index 4a7ac15a8e..1a0472d432 100644 --- a/libavcodec/hapdec.c +++ b/libavcodec/hapdec.c @@ -301,11 +301,10 @@ static int decompress_texture2_thread(AVCodecContext *avctx, void *arg, return decompress_texture_thread_internal(avctx, arg, slice, thread_nb, 1); } -static int hap_decode(AVCodecContext *avctx, void *data, +static int hap_decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt) { HapContext *ctx = avctx->priv_data; - AVFrame *const frame = data; int ret, i, t; int section_size; enum HapSectionType section_type; -- cgit v1.2.3