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

avcodec/opus/dec: Don't call function multiple times in FFMAX

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-07-04 08:48:26 +02:00
parent faf0d81309
commit 66f29ae9b6

View File

@ -489,8 +489,9 @@ static int opus_decode_packet(AVCodecContext *avctx, AVFrame *frame,
OpusStreamContext *s = &c->streams[i];
s->out[0] =
s->out[1] = NULL;
int fifo_samples = av_audio_fifo_size(s->sync_buffer);
delayed_samples = FFMAX(delayed_samples,
s->delayed_samples + av_audio_fifo_size(s->sync_buffer));
s->delayed_samples + fifo_samples);
}
/* decode the header of the first sub-packet to find out the sample count */