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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6561>
This commit is contained in:
Jan Schmidt 2024-04-02 21:30:50 +11:00 committed by Tim-Philipp Müller
parent 4b6cbca300
commit b3d6a14737

View file

@ -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