1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/opus/dec: Remove unused parameters

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@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-07-03 23:17:09 +02:00
parent ba2c9acedb
commit faf0d81309

View File

@ -393,9 +393,7 @@ static int opus_decode_frame(OpusStreamContext *s, const uint8_t *data, int size
return samples; return samples;
} }
static int opus_decode_subpacket(OpusStreamContext *s, static int opus_decode_subpacket(OpusStreamContext *s, const uint8_t *buf)
const uint8_t *buf, int buf_size,
int nb_samples)
{ {
int output_samples = 0; int output_samples = 0;
int flush_needed = 0; int flush_needed = 0;
@ -578,8 +576,7 @@ static int opus_decode_packet(AVCodecContext *avctx, AVFrame *frame,
s->silk_samplerate = get_silk_samplerate(s->packet.config); s->silk_samplerate = get_silk_samplerate(s->packet.config);
} }
ret = opus_decode_subpacket(&c->streams[i], buf, s->packet.data_size, ret = opus_decode_subpacket(&c->streams[i], buf);
coded_samples);
if (ret < 0) if (ret < 0)
return ret; return ret;
s->decoded_samples = ret; s->decoded_samples = ret;