Index: gst-libs/gst/rtp/gstbasertpdepayload.h
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst-libs/gst/rtp/gstbasertpdepayload.h,v
retrieving revision 1.10
diff -u -r1.10 gstbasertpdepayload.h
--- gst-libs/gst/rtp/gstbasertpdepayload.h	3 Nov 2005 22:49:38 -0000	1.10
+++ gst-libs/gst/rtp/gstbasertpdepayload.h	8 Nov 2005 21:46:52 -0000
@@ -77,6 +77,7 @@
    * RTP_QUEUEDELAY ms late 
    */
   GQueue *queue;
+  gboolean first;
 
   GstClock *clock;
 
Index: gst-libs/gst/rtp/gstbasertpdepayload.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst-libs/gst/rtp/gstbasertpdepayload.c,v
retrieving revision 1.18
diff -u -r1.18 gstbasertpdepayload.c
--- gst-libs/gst/rtp/gstbasertpdepayload.c	2 Nov 2005 10:23:38 -0000	1.18
+++ gst-libs/gst/rtp/gstbasertpdepayload.c	8 Nov 2005 21:48:06 -0000
@@ -148,6 +148,7 @@
   filter->queue = g_queue_new ();
 
   filter->queue_delay = RTP_QUEUE_DELAY;
+  filter->first = TRUE;
 
   /* this one needs to be overwritten by child */
   filter->clock_rate = 0;
@@ -284,8 +285,6 @@
 gst_base_rtp_depayload_set_gst_timestamp (GstBaseRTPDepayload * filter,
     guint32 timestamp, GstBuffer * buf)
 {
-  static gboolean first = TRUE;
-
   guint64 ts = ((timestamp * GST_SECOND) / filter->clock_rate);
 
   /* rtp timestamps are based on the clock_rate
@@ -299,13 +298,13 @@
       GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
 
   /* if this is the first buf send a discont */
-  if (first) {
+  if (filter->first) {
     /* send discont */
     GstEvent *event = gst_event_new_newsegment (FALSE, 1.0, GST_FORMAT_TIME,
-        ts, GST_CLOCK_TIME_NONE, 0);
+        GST_BUFFER_TIMESTAMP (buf), GST_CLOCK_TIME_NONE, 0);
 
     gst_pad_push_event (filter->srcpad, event);
-    first = FALSE;
+    filter->first = FALSE;
     GST_DEBUG_OBJECT (filter, "Pushed discont on this first buffer");
   }
   /* add delay to timestamp */
