Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-03-30 22:33:24 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-04-05 20:54:09 +0300
commitce7dbd0481f990e249c2a05f179228489d3062cf (patch)
treec5f04e58129705430e1d97a5842131b72e250083 /libavcodec/wmavoice.c
parentfb59a42ef977dd91085a602f10c9c82f88d072e5 (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/wmavoice.c')
-rw-r--r--libavcodec/wmavoice.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index c251c9e1ec..571dd5803b 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -1903,7 +1903,7 @@ static void copy_bits(PutBitContext *pb,
*
* For more information about frames, see #synth_superframe().
*/
-static int wmavoice_decode_packet(AVCodecContext *ctx, void *data,
+static int wmavoice_decode_packet(AVCodecContext *ctx, AVFrame *frame,
int *got_frame_ptr, AVPacket *avpkt)
{
WMAVoiceContext *s = ctx->priv_data;
@@ -1942,7 +1942,7 @@ static int wmavoice_decode_packet(AVCodecContext *ctx, void *data,
copy_bits(&s->pb, avpkt->data, size, gb, s->spillover_nbits);
flush_put_bits(&s->pb);
s->sframe_cache_size += s->spillover_nbits;
- if ((res = synth_superframe(ctx, data, got_frame_ptr)) == 0 &&
+ if ((res = synth_superframe(ctx, frame, got_frame_ptr)) == 0 &&
*got_frame_ptr) {
cnt += s->spillover_nbits;
s->skip_bits_next = cnt & 7;
@@ -1965,7 +1965,7 @@ static int wmavoice_decode_packet(AVCodecContext *ctx, void *data,
*got_frame_ptr = 0;
return size;
} else if (s->nb_superframes > 0) {
- if ((res = synth_superframe(ctx, data, got_frame_ptr)) < 0) {
+ if ((res = synth_superframe(ctx, frame, got_frame_ptr)) < 0) {
return res;
} else if (*got_frame_ptr) {
int cnt = get_bits_count(gb);