+ /* If we updated the duration and doing forward playback, we
+ * have to update the downstream segments to update the stop
+ * position */
+ if (updated && src->segment.rate >= 0.0) {
+ gint64 stop;
+ GstEvent *event;
+
+ /* for deriving a stop position for the playback segment from the seek
+ * segment, we must take the duration when the stop is not set */
+ if ((stop = src->segment.stop) == -1)
+ stop = src->segment.duration;
+
+ GST_DEBUG_OBJECT (src, "Sending update newsegment from %" G_GINT64_FORMAT
+ " to %" G_GINT64_FORMAT, src->segment.start, stop);
+
+ event =
+ gst_event_new_new_segment_full (TRUE,
+ src->segment.rate, src->segment.applied_rate, src->segment.format,
+ src->segment.start, stop, src->segment.time);
+ gst_pad_push_event (src->srcpad, event);
+ }
+