diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-03-30 21:33:24 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-04-05 19:54:09 +0200 |
commit | ce7dbd0481f990e249c2a05f179228489d3062cf (patch) | |
tree | c5f04e58129705430e1d97a5842131b72e250083 /libavcodec/svq3.c | |
parent | fb59a42ef977dd91085a602f10c9c82f88d072e5 (diff) |
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 <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r-- | libavcodec/svq3.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; |