Correctly check for the DISCONT buffer flag to be set

This commit is contained in:
Sebastian Dröge 2022-03-20 20:11:28 +02:00
parent 09a697faef
commit 4874c7eb1f
2 changed files with 2 additions and 2 deletions

View file

@ -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)?;
}

View file

@ -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)?;
}