Unified · Split
| @@ -323,7 +323,7 @@ static int opus_decode_frame(OpusStreamContext *s, const uint8_t *data, int size · 322 unmodified lines | |||
| 323 | } else { | 323 | } else { |
| 324 | av_log(s->avctx, AV_LOG_WARNING, | 324 | av_log(s->avctx, AV_LOG_WARNING, |
| 325 | "Spurious CELT delay samples present.\n"); | 325 | "Spurious CELT delay samples present.\n"); |
| 326 | av_audio_fifo_drain(s->celt_delay, delay_samples); | 326 | av_audio_fifo_reset(s->celt_delay); |
| 327 | if (s->avctx->err_recognition & AV_EF_EXPLODE) | 327 | if (s->avctx->err_recognition & AV_EF_EXPLODE) |
| 328 | return AVERROR_BUG; | 328 | return AVERROR_BUG; |
| 329 | } | 329 | } |
| @@ -640,10 +640,10 @@ static av_cold void opus_decode_flush(AVCodecContext *ctx) · 310 unmodified lines | |||
| 640 | memset(&s->packet, 0, sizeof(s->packet)); | 640 | memset(&s->packet, 0, sizeof(s->packet)); |
| 641 | s->delayed_samples = 0; | 641 | s->delayed_samples = 0; |
| 642 | 642 | ||
| 643 | av_audio_fifo_drain(s->celt_delay, av_audio_fifo_size(s->celt_delay)); | 643 | av_audio_fifo_reset(s->celt_delay); |
| 644 | swr_close(s->swr); | 644 | swr_close(s->swr); |
| 645 | 645 | ||
| 646 | av_audio_fifo_drain(s->sync_buffer, av_audio_fifo_size(s->sync_buffer)); | 646 | av_audio_fifo_reset(s->sync_buffer); |
| 647 | 647 | ||
| 648 | ff_silk_flush(s->silk); | 648 | ff_silk_flush(s->silk); |
| 649 | ff_celt_flush(s->celt); | 649 | ff_celt_flush(s->celt); |