rtpjitterbuffer: reset skew does not reset clock-rate
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 30 Sep 2013 09:53:08 +0000 (11:53 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 30 Sep 2013 09:53:08 +0000 (11:53 +0200)
Don't reset the clock-rate when we reset the skew correction algorithm.
Reset the skew correction algorithm when we change the clock-rate.

gst/rtpmanager/rtpjitterbuffer.c

index 7876f05..b7aac10 100644 (file)
@@ -182,11 +182,8 @@ rtp_jitter_buffer_set_clock_rate (RTPJitterBuffer * jbuf, guint32 clock_rate)
       GST_WARNING ("Clock rate changed from %" G_GUINT32_FORMAT " to %"
           G_GUINT32_FORMAT, jbuf->clock_rate, clock_rate);
     }
-    jbuf->base_time = -1;
-    jbuf->base_rtptime = -1;
     jbuf->clock_rate = clock_rate;
-    jbuf->prev_out_time = -1;
-    jbuf->prev_send_diff = -1;
+    rtp_jitter_buffer_reset_skew (jbuf);
   }
 }
 
@@ -216,7 +213,6 @@ rtp_jitter_buffer_reset_skew (RTPJitterBuffer * jbuf)
   jbuf->base_time = -1;
   jbuf->base_rtptime = -1;
   jbuf->base_extrtp = -1;
-  jbuf->clock_rate = -1;
   jbuf->ext_rtptime = -1;
   jbuf->last_rtptime = -1;
   jbuf->window_pos = 0;