diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-10-01 12:12:09 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-10-01 12:12:09 +0200 |
commit | c262735164ac680dc15b581fe87497fad6cbb482 (patch) | |
tree | eeee093d193d9680a5ef75123a8eb9cfa882e76c /gst/rtpmanager/rtpjitterbuffer.c | |
parent | 458cd4dcdc4e9295fccf379499406a872eec9ff6 (diff) |
jitterbuffer: handle -1 input timestamps
Don't try to check a -1 timestamp against the max delay.
Diffstat (limited to 'gst/rtpmanager/rtpjitterbuffer.c')
-rw-r--r-- | gst/rtpmanager/rtpjitterbuffer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gst/rtpmanager/rtpjitterbuffer.c b/gst/rtpmanager/rtpjitterbuffer.c index e93b5509..6837bd47 100644 --- a/gst/rtpmanager/rtpjitterbuffer.c +++ b/gst/rtpmanager/rtpjitterbuffer.c @@ -215,11 +215,10 @@ calculate_skew (RTPJitterBuffer * jbuf, guint32 rtptime, GstClockTime time, if (jbuf->clock_rate != clock_rate) { if (jbuf->clock_rate == -1) { GST_DEBUG ("Clock rate changed from %" G_GUINT32_FORMAT " to %" - G_GUINT32_FORMAT, jbuf->clock_rate, clock_rate); - } - else { + G_GUINT32_FORMAT, jbuf->clock_rate, clock_rate); + } else { GST_WARNING ("Clock rate changed from %" G_GUINT32_FORMAT " to %" - G_GUINT32_FORMAT, jbuf->clock_rate, clock_rate); + G_GUINT32_FORMAT, jbuf->clock_rate, clock_rate); } jbuf->base_time = -1; jbuf->base_rtptime = -1; @@ -393,7 +392,7 @@ no_skew: } } - if (out_time + max_delay < time) { + if (time != -1 && out_time + max_delay < time) { /* if we are going to produce a timestamp that is later than the input * timestamp, we need to reset the jitterbuffer. Likely the server paused * temporarily */ |