diff mbox series

[FFmpeg-devel,03/30] avcodec/opusdec: Remove always-true check

Message ID 20201230233157.1055287-3-andreas.rheinhardt@gmail.com
State Accepted
Commit 2825ed4e26f7683f0cf6baed0bbc62b095652ff9
Headers show
Series [FFmpeg-devel,01/30] avcodec/opustab: Make array static
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Dec. 30, 2020, 11:31 p.m. UTC
The celt_delay AVAudioFifo is always allocated during init, so checking
for its existence in .flush is unnecessary.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/opusdec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

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]));