diff -Naur gst-plugins-base-0.10.12/ext/ogg/gstoggdemux.c gst-plugins-base-0.10.12-new/ext/ogg/gstoggdemux.c
--- gst-plugins-base-0.10.12/ext/ogg/gstoggdemux.c	2007-03-01 13:05:19.000000000 -0500
+++ gst-plugins-base-0.10.12-new/ext/ogg/gstoggdemux.c	2007-05-13 23:35:38.000000000 -0400
@@ -1026,39 +1026,10 @@
       /* see if we have enough info to activate the chain */
       if (gst_ogg_demux_collect_chain_info (ogg, chain)) {
         GstEvent *event;
-        GstClockTime segment_start, segment_stop, segment_time;
-
-        GST_DEBUG_OBJECT (ogg, "chain->begin_time:    %" GST_TIME_FORMAT,
-            GST_TIME_ARGS (chain->begin_time));
-        GST_DEBUG_OBJECT (ogg, "chain->segment_start: %" GST_TIME_FORMAT,
-            GST_TIME_ARGS (chain->segment_start));
-        GST_DEBUG_OBJECT (ogg, "chain->segment_stop:  %" GST_TIME_FORMAT,
-            GST_TIME_ARGS (chain->segment_stop));
-
-        if (chain->begin_time != GST_CLOCK_TIME_NONE) {
-          segment_time = chain->begin_time;
-          segment_start = chain->segment_start - chain->begin_time;
-          if (chain->segment_stop != GST_CLOCK_TIME_NONE) {
-            segment_stop = chain->segment_stop - chain->begin_time;
-          } else {
-            segment_stop = GST_CLOCK_TIME_NONE;
-          }
-        } else {
-          segment_start = chain->segment_start;
-          segment_stop = chain->segment_stop;
-          segment_time = 0;
-        }
-
-        GST_DEBUG_OBJECT (ogg, "segment_start: %" GST_TIME_FORMAT,
-            GST_TIME_ARGS (segment_start));
-        GST_DEBUG_OBJECT (ogg, "segment_stop:  %" GST_TIME_FORMAT,
-            GST_TIME_ARGS (segment_stop));
-        GST_DEBUG_OBJECT (ogg, "segment_time:  %" GST_TIME_FORMAT,
-            GST_TIME_ARGS (segment_time));
 
         /* create the newsegment event we are going to send out */
         event = gst_event_new_new_segment (FALSE, ogg->segment.rate,
-            GST_FORMAT_TIME, segment_start, segment_stop, segment_time);
+            GST_FORMAT_TIME, chain->segment_start, chain->segment_stop, chain->begin_time);
 
         gst_ogg_demux_activate_chain (ogg, chain, event);
 
@@ -2157,14 +2128,11 @@
     if (flush)
       gst_ogg_demux_send_event (ogg, gst_event_new_flush_stop ());
 
-    if ((stop = ogg->segment.stop) == -1)
-      stop = ogg->segment.duration;
-    if (stop != -1)
-      stop += chain->segment_start;
-
     start = ogg->segment.start;
     if (chain->segment_start != GST_CLOCK_TIME_NONE)
       start += chain->segment_start;
+      
+    stop = start + chain->total_time;
 
     last_stop = ogg->segment.last_stop;
     if (chain->segment_start != GST_CLOCK_TIME_NONE)
@@ -2734,7 +2702,13 @@
     chain = gst_ogg_demux_find_chain (ogg, serialno);
     if (chain) {
       /* we do, activate it as it means we have a non-header */
-      gst_ogg_demux_activate_chain (ogg, chain, NULL);
+      GstEvent *event;
+       /* create the newsegment event we are going to send out */
+      event = gst_event_new_new_segment (FALSE, ogg->segment.rate, 
+           GST_FORMAT_TIME, 
+           chain->segment_start, chain->segment_stop, chain->begin_time);
+           
+      gst_ogg_demux_activate_chain (ogg, chain, event);
       pad = gst_ogg_demux_find_pad (ogg, serialno);
     } else {
       GstClockTime chain_time;
