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/dvaudiodec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavcodec/dvaudiodec.c') diff --git a/libavcodec/dvaudiodec.c b/libavcodec/dvaudiodec.c index 96aa1c2005..97851981c5 100644 --- a/libavcodec/dvaudiodec.c +++ b/libavcodec/dvaudiodec.c @@ -85,11 +85,10 @@ static inline uint16_t dv_audio_12to16(uint16_t sample) return result; } -static int decode_frame(AVCodecContext *avctx, void *data, +static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *pkt) { DVAudioContext *s = avctx->priv_data; - AVFrame *frame = data; const uint8_t *src = pkt->data; int16_t *dst; int ret, i; -- cgit v1.2.3