From 8ef12a72e88877e76c7337f826a3c00f6e3913d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 14 Feb 2024 10:04:54 +0200 Subject: [PATCH] rtpgccbwe: Don't reset PTS/DTS to `None` The element is usually placed before `rtpsession`, and `rtpsession` needs the PTS/DTS for correctly determining the running time. The running time is then used to produce correct RTCP SR, and to potentially update an NTP-64 RTP header extension if existing on the packets. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/496 Part-of: --- net/rtp/src/gcc/imp.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/rtp/src/gcc/imp.rs b/net/rtp/src/gcc/imp.rs index 84f6daa6..4cafd6c6 100644 --- a/net/rtp/src/gcc/imp.rs +++ b/net/rtp/src/gcc/imp.rs @@ -1146,15 +1146,12 @@ impl ObjectSubclass for BandwidthEstimator { fn with_class(klass: &Self::Class) -> Self { let templ = klass.pad_template("sink").unwrap(); let sinkpad = gst::Pad::builder_from_template(&templ) - .chain_function(|_pad, parent, mut buffer| { + .chain_function(|_pad, parent, buffer| { BandwidthEstimator::catch_panic_pad_function( parent, || Err(gst::FlowError::Error), |this| { let mut state = this.state.lock().unwrap(); - let mutbuf = buffer.make_mut(); - mutbuf.set_pts(None); - mutbuf.set_dts(None); state.buffers.push_front(buffer); state.flow_return