ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Fri Jul 4 08:58:06 2025 +0200| [9139edfdd346ea964ffac3310950c4b2c2f7906c] | committer: Andreas Rheinhardt
avcodec/opus/dec: Simplify resetting AVAudioFifo Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9139edfdd346ea964ffac3310950c4b2c2f7906c --- libavcodec/opus/dec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/opus/dec.c b/libavcodec/opus/dec.c index 92a9096ee1..29c490ae37 100644 --- a/libavcodec/opus/dec.c +++ b/libavcodec/opus/dec.c @@ -323,7 +323,7 @@ static int opus_decode_frame(OpusStreamContext *s, const uint8_t *data, int size } else { av_log(s->avctx, AV_LOG_WARNING, "Spurious CELT delay samples present.\n"); - av_audio_fifo_drain(s->celt_delay, delay_samples); + av_audio_fifo_reset(s->celt_delay); if (s->avctx->err_recognition & AV_EF_EXPLODE) return AVERROR_BUG; } @@ -640,10 +640,10 @@ static av_cold void opus_decode_flush(AVCodecContext *ctx) memset(&s->packet, 0, sizeof(s->packet)); s->delayed_samples = 0; - av_audio_fifo_drain(s->celt_delay, av_audio_fifo_size(s->celt_delay)); + av_audio_fifo_reset(s->celt_delay); swr_close(s->swr); - av_audio_fifo_drain(s->sync_buffer, av_audio_fifo_size(s->sync_buffer)); + av_audio_fifo_reset(s->sync_buffer); ff_silk_flush(s->silk); ff_celt_flush(s->celt); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".