diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-26 13:09:49 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-31 21:43:31 +0100 |
commit | 2825ed4e26f7683f0cf6baed0bbc62b095652ff9 (patch) | |
tree | bd88d6334eacd5a0be7259da909ba609a876413f /libavcodec/opusdec.c | |
parent | 2089d21bc73d54faee1170d12e0d2b85ad821f57 (diff) | |
download | ffmpeg-2825ed4e26f7683f0cf6baed0bbc62b095652ff9.tar.gz |
avcodec/opusdec: Remove always-true check
The celt_delay AVAudioFifo is always allocated during init, so checking
for its existence in .flush is unnecessary.
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/opusdec.c')
-rw-r--r-- | libavcodec/opusdec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c index a08758d25d..86a3181e9d 100644 --- a/libavcodec/opusdec.c +++ b/libavcodec/opusdec.c @@ -576,8 +576,7 @@ static av_cold void opus_decode_flush(AVCodecContext *ctx) memset(&s->packet, 0, sizeof(s->packet)); s->delayed_samples = 0; - if (s->celt_delay) - av_audio_fifo_drain(s->celt_delay, av_audio_fifo_size(s->celt_delay)); + av_audio_fifo_drain(s->celt_delay, av_audio_fifo_size(s->celt_delay)); swr_close(s->swr); av_audio_fifo_drain(c->sync_buffers[i], av_audio_fifo_size(c->sync_buffers[i])); |