jitterbuffer: avoid using wrong clock-rate
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 25 Nov 2009 16:38:23 +0000 (10:38 -0600)
committerWim Taymans <wim@metal.(none)>
Wed, 25 Nov 2009 16:38:23 +0000 (10:38 -0600)
Check for a valid clock-rate before attempting to estimate the npt
stop time.

gst/rtpmanager/gstrtpjitterbuffer.c

index c37bd6b..1fce103 100644 (file)
@@ -1637,7 +1637,7 @@ push_buffer:
 
   /* update the elapsed time when we need to check against the npt stop time. */
   if (priv->npt_stop != -1 && priv->ext_timestamp != -1
-      && priv->clock_base != -1) {
+      && priv->clock_base != -1 && priv->clock_rate > 0) {
     guint64 ext_time, elapsed, estimated;
     guint32 rtp_time;