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/svq3.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libavcodec/svq3.c') diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index 7c2d5147b0..69949b7e63 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1371,7 +1371,7 @@ fail: return ret; } -static int svq3_decode_frame(AVCodecContext *avctx, void *data, +static int svq3_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt) { SVQ3Context *s = avctx->priv_data; @@ -1382,7 +1382,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, /* special case for last picture */ if (buf_size == 0) { if (s->next_pic->f->data[0] && !s->low_delay && !s->last_frame_output) { - ret = av_frame_ref(data, s->next_pic->f); + ret = av_frame_ref(rframe, s->next_pic->f); if (ret < 0) return ret; s->last_frame_output = 1; @@ -1553,9 +1553,9 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, } if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) - ret = av_frame_ref(data, s->cur_pic->f); + ret = av_frame_ref(rframe, s->cur_pic->f); else if (s->last_pic->f->data[0]) - ret = av_frame_ref(data, s->last_pic->f); + ret = av_frame_ref(rframe, s->last_pic->f); if (ret < 0) return ret; -- cgit v1.2.3