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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1462>
This commit is contained in:
Sebastian Dröge 2024-02-14 10:04:54 +02:00 committed by GStreamer Marge Bot
parent 05884de50c
commit 8ef12a72e8

View file

@ -1146,15 +1146,12 @@ impl ObjectSubclass for BandwidthEstimator {
fn with_class(klass: &Self::Class) -> Self { fn with_class(klass: &Self::Class) -> Self {
let templ = klass.pad_template("sink").unwrap(); let templ = klass.pad_template("sink").unwrap();
let sinkpad = gst::Pad::builder_from_template(&templ) let sinkpad = gst::Pad::builder_from_template(&templ)
.chain_function(|_pad, parent, mut buffer| { .chain_function(|_pad, parent, buffer| {
BandwidthEstimator::catch_panic_pad_function( BandwidthEstimator::catch_panic_pad_function(
parent, parent,
|| Err(gst::FlowError::Error), || Err(gst::FlowError::Error),
|this| { |this| {
let mut state = this.state.lock().unwrap(); 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.buffers.push_front(buffer);
state.flow_return state.flow_return