[FFmpeg-devel] [PATCH 2/4] avcodec/opus/dec: Remove unused parameters
Andreas Rheinhardt
ffmpegagent at gmail.com
Fri Jul 4 13:35:19 EEST 2025
From: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
The parameters here are not only unused, but buf_size's value
is actually wrong when flushing (it comes from the subpacket
of the last packet sent and is therefore outdated).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/opus/dec.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/libavcodec/opus/dec.c b/libavcodec/opus/dec.c
index a43146c82c..05f7a12d8e 100644
--- a/libavcodec/opus/dec.c
+++ b/libavcodec/opus/dec.c
@@ -393,9 +393,7 @@ static int opus_decode_frame(OpusStreamContext *s, const uint8_t *data, int size
return samples;
}
-static int opus_decode_subpacket(OpusStreamContext *s,
- const uint8_t *buf, int buf_size,
- int nb_samples)
+static int opus_decode_subpacket(OpusStreamContext *s, const uint8_t *buf)
{
int output_samples = 0;
int flush_needed = 0;
@@ -581,8 +579,7 @@ static int opus_decode_packet(AVCodecContext *avctx, AVFrame *frame,
s->silk_samplerate = get_silk_samplerate(s->packet.config);
}
- ret = opus_decode_subpacket(&c->streams[i], buf, s->packet.data_size,
- coded_samples);
+ ret = opus_decode_subpacket(&c->streams[i], buf);
if (ret < 0)
return ret;
s->decoded_samples = ret;
--
ffmpeg-codebot
More information about the ffmpeg-devel
mailing list