From 4874c7eb1fba2c3387ce77cdd53d63eec546b99c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 20 Mar 2022 20:11:28 +0200 Subject: [PATCH] Correctly check for the `DISCONT` buffer flag to be set --- audio/audiofx/src/audiornnoise/imp.rs | 2 +- audio/csound/src/filter/imp.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/audiofx/src/audiornnoise/imp.rs b/audio/audiofx/src/audiornnoise/imp.rs index 8a90c476..3633ec35 100644 --- a/audio/audiofx/src/audiornnoise/imp.rs +++ b/audio/audiofx/src/audiornnoise/imp.rs @@ -310,7 +310,7 @@ impl BaseTransformImpl for AudioRNNoise { // if it is not the case, just notify the parent class to not generate // an output if let Some(buffer) = self.take_queued_buffer() { - if buffer.flags() == gst::BufferFlags::DISCONT { + if buffer.flags().contains(gst::BufferFlags::DISCONT) { self.drain(element)?; } diff --git a/audio/csound/src/filter/imp.rs b/audio/csound/src/filter/imp.rs index 52faf47a..2761f7e8 100644 --- a/audio/csound/src/filter/imp.rs +++ b/audio/csound/src/filter/imp.rs @@ -644,7 +644,7 @@ impl BaseTransformImpl for CsoundFilter { // if it is not the case, just notify the parent class to not generate // an output if let Some(buffer) = self.take_queued_buffer() { - if buffer.flags() == gst::BufferFlags::DISCONT { + if buffer.flags().contains(gst::BufferFlags::DISCONT) { self.drain(element)?; }