diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-03-30 22:33:24 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-04-05 20:54:09 +0300 |
commit | ce7dbd0481f990e249c2a05f179228489d3062cf (patch) | |
tree | c5f04e58129705430e1d97a5842131b72e250083 /libavcodec/wmalosslessdec.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/wmalosslessdec.c')
-rw-r--r-- | libavcodec/wmalosslessdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index d4f3462804..daa775314d 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -1184,8 +1184,8 @@ static void save_bits(WmallDecodeCtx *s, GetBitContext* gb, int len, skip_bits(&s->gb, s->frame_offset); } -static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, - AVPacket* avpkt) +static int decode_packet(AVCodecContext *avctx, AVFrame *rframe, + int *got_frame_ptr, AVPacket* avpkt) { WmallDecodeCtx *s = avctx->priv_data; GetBitContext* gb = &s->pgb; @@ -1298,7 +1298,7 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, } *got_frame_ptr = s->frame->nb_samples > 0; - av_frame_move_ref(data, s->frame); + av_frame_move_ref(rframe, s->frame); s->packet_offset = get_bits_count(gb) & 7; |