From 42158cbcb0708d32a11beb53f853808831b2e08f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Tue, 9 Apr 2024 16:24:16 +0200 Subject: [PATCH] gccbwe: don't log an error when handling a buffer list while stopping When `webrtcsink` was stopped, `gccbwe` could log an error if it was handling a buffer list. This commit logs an error only if `push_list()` returned an error other than `Flushing`. Part-of: --- net/rtp/src/gcc/imp.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/rtp/src/gcc/imp.rs b/net/rtp/src/gcc/imp.rs index 30ca1697..598405a3 100644 --- a/net/rtp/src/gcc/imp.rs +++ b/net/rtp/src/gcc/imp.rs @@ -1096,7 +1096,9 @@ impl BandwidthEstimator { if !list.is_empty() { if let Err(err) = bwe.imp().push_list(list) { - gst::error!(CAT, obj: bwe, "pause task, reason: {err:?}"); + if err != gst::FlowError::Flushing { + gst::error!(CAT, obj: bwe, "pause task, reason: {err:?}"); + } pause() } }