libs/gst/base/gstbasesrc.c: Also initialize the counter that calculates the first...
authorWim Taymans <wim.taymans@gmail.com>
Mon, 1 Oct 2007 17:59:21 +0000 (17:59 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Mon, 1 Oct 2007 17:59:21 +0000 (17:59 +0000)
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_change_state):
Also initialize the counter that calculates the first timestamp on a
buffer correctly for non-live sources.

ChangeLog
libs/gst/base/gstbasesrc.c

index a25bfb9..7dda41e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-01  Wim Taymans  <wim.taymans@gmail.com>
+
+       * libs/gst/base/gstbasesrc.c: (gst_base_src_change_state):
+       Also initialize the counter that calculates the first timestamp on a
+       buffer correctly for non-live sources.
+
 2007-10-01  Edward Hervey  <bilboed@bilboed.com>
 
        * plugins/elements/gstqueue.c: (gst_queue_locked_dequeue):
index ff13edc..b8b1251 100644 (file)
@@ -2486,6 +2486,7 @@ gst_base_src_change_state (GstElement * element, GstStateChange transition)
       break;
     case GST_STATE_CHANGE_READY_TO_PAUSED:
       GST_LIVE_LOCK (element);
+      basesrc->priv->latency = -1;
       if (basesrc->is_live) {
         no_preroll = TRUE;
         basesrc->live_running = FALSE;
@@ -2496,8 +2497,9 @@ gst_base_src_change_state (GstElement * element, GstStateChange transition)
       break;
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
       GST_LIVE_LOCK (element);
-      basesrc->priv->latency = -1;
       if (basesrc->is_live) {
+        /* for live sources we restart the timestamp correction */
+        basesrc->priv->latency = -1;
         basesrc->live_running = TRUE;
         GST_LIVE_SIGNAL (element);
       }