mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
jitterbuffer: don't resync to invalid timestamps
If we detect backward timestamps on the server, don't try to resync when we don't have an input timestamp (such as when using RTSP over TCP) instead, do nothing but assume the timestamp was ok, it will correct itself when time goes forwards.
This commit is contained in:
parent
d344754f03
commit
7f08081016
1 changed files with 4 additions and 1 deletions
|
@ -381,12 +381,15 @@ calculate_skew (RTPJitterBuffer * jbuf, guint32 rtptime, GstClockTime time,
|
|||
|
||||
if (G_LIKELY (gstrtptime >= jbuf->base_rtptime))
|
||||
send_diff = gstrtptime - jbuf->base_rtptime;
|
||||
else {
|
||||
else if (time != -1) {
|
||||
/* elapsed time at sender, timestamps can go backwards and thus be smaller
|
||||
* than our base time, take a new base time in that case. */
|
||||
GST_WARNING ("backward timestamps at server, taking new base time");
|
||||
rtp_jitter_buffer_resync (jbuf, time, gstrtptime, ext_rtptime, FALSE);
|
||||
send_diff = 0;
|
||||
} else {
|
||||
GST_WARNING ("backward timestamps at server but no timestamps");
|
||||
send_diff = 0;
|
||||
}
|
||||
|
||||
GST_DEBUG ("extrtp %" G_GUINT64_FORMAT ", gstrtp %" GST_TIME_FORMAT ", base %"
|
||||
|
|
Loading…
Reference in a new issue