From 489021ed5578ae519dbf3bfaf64084225fb9d49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 7 Aug 2024 10:47:28 +0300 Subject: [PATCH] rtp: basepay: Don't negotiate twice in the beginning If srcpad caps are already set as part of sinkpad caps handling, unset the reconfigure flag so negotiation does not happen yet another time on the first buffer. Part-of: --- net/rtp/src/basepay/imp.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/rtp/src/basepay/imp.rs b/net/rtp/src/basepay/imp.rs index ecb179f7a..4398e7c0a 100644 --- a/net/rtp/src/basepay/imp.rs +++ b/net/rtp/src/basepay/imp.rs @@ -230,11 +230,13 @@ impl RtpBasePay2 { let state = self.state.borrow_mut(); let Some(ref src_caps) = state.src_caps else { gst::debug!(CAT, imp = self, "No src caps set yet, can't negotiate"); + self.src_pad.mark_reconfigure(); return; }; let mut src_caps = src_caps.clone(); drop(state); + self.src_pad.check_reconfigure(); gst::debug!(CAT, imp = self, "Configured src caps: {src_caps:?}"); let peer_caps = self.src_pad.peer_query_caps(Some(&src_caps));