Browse Source

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>
tags/n4.4
Andreas Rheinhardt 5 years ago
parent
commit
2825ed4e26
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libavcodec/opusdec.c

+ 1
- 2
libavcodec/opusdec.c View File

@@ -576,8 +576,7 @@ static av_cold void opus_decode_flush(AVCodecContext *ctx)
memset(&s->packet, 0, sizeof(s->packet)); memset(&s->packet, 0, sizeof(s->packet));
s->delayed_samples = 0; 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); swr_close(s->swr);


av_audio_fifo_drain(c->sync_buffers[i], av_audio_fifo_size(c->sync_buffers[i])); av_audio_fifo_drain(c->sync_buffers[i], av_audio_fifo_size(c->sync_buffers[i]));


Loading…
Cancel
Save