From 832a5179657ab88ae0535ec78e8ef7070cff0284 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 2 Apr 2024 21:30:50 +1100 Subject: [PATCH] rtpjitterbuffer: Don't use estimated_dts to do default skew adjustment When the buffer DTS is estimated based on arrival time at the jitterbuffer (rather than provided on the incoming buffer itself), it shouldn't be used for skew adjustment. The typical case is packets being deinterleaved from a tunnelled TCP/HTTP RTSP stream, and the arrival times at the jitter buffer are not well enough correlated to usefully do skew adjustments. This restores the original intended behaviour for the 'estimated dts' path, that was broken years ago during other jitterbuffer refactoring. Part-of: --- subprojects/gst-plugins-good/gst/rtpmanager/rtpjitterbuffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/gst/rtpmanager/rtpjitterbuffer.c b/subprojects/gst-plugins-good/gst/rtpmanager/rtpjitterbuffer.c index 7053e03f4c..067657c0ab 100644 --- a/subprojects/gst-plugins-good/gst/rtpmanager/rtpjitterbuffer.c +++ b/subprojects/gst-plugins-good/gst/rtpmanager/rtpjitterbuffer.c @@ -1082,7 +1082,9 @@ rtp_jitter_buffer_calculate_pts (RTPJitterBuffer * jbuf, GstClockTime dts, /* do skew calculation by measuring the difference between rtptime and the * receive dts, this function will return the skew corrected rtptime. */ - pts = calculate_skew (jbuf, ext_rtptime, gstrtptime, dts, gap, is_rtx); + pts = + calculate_skew (jbuf, ext_rtptime, gstrtptime, estimated_dts ? -1 : dts, + gap, is_rtx); } /* check if timestamps are not going backwards, we can only check this if we