aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-07-04 08:48:26 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-07-11 15:14:21 +0200
commit66f29ae9b6ae3d3d4e394b10bb4808c3e191844b (patch)
treee7eca9d92ad551026ccc7b8eb047fa224cf011d5
parentfaf0d813094d292d6b8d78afd2519f87ae318ace (diff)
downloadffmpeg-66f29ae9b6ae3d3d4e394b10bb4808c3e191844b.tar.gz
avcodec/opus/dec: Don't call function multiple times in FFMAX
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/opus/dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/opus/dec.c b/libavcodec/opus/dec.c
index acf54582ce..92a9096ee1 100644
--- a/libavcodec/opus/dec.c
+++ b/libavcodec/opus/dec.c
@@ -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 */