segment: also copy the segment flag
authorStefan Sauer <ensonic@users.sf.net>
Mon, 9 Jul 2012 20:11:31 +0000 (22:11 +0200)
committerStefan Sauer <ensonic@users.sf.net>
Mon, 9 Jul 2012 20:16:46 +0000 (22:16 +0200)
Fixes segmented seeks (as tested e.g. in the adder tests in base).

gst/gstsegment.c
gst/gstsegment.h

index fb73068..f1c9c83 100644 (file)
@@ -323,6 +323,8 @@ gst_segment_do_seek (GstSegment * segment, gdouble rate,
     segment->flags |= GST_SEGMENT_FLAG_RESET;
   if ((flags & GST_SEEK_FLAG_SKIP) != 0)
     segment->flags |= GST_SEGMENT_FLAG_SKIP;
+  if ((flags & GST_SEEK_FLAG_SEGMENT) != 0)
+    segment->flags |= GST_SEGMENT_FLAG_SEGMENT;
   segment->start = start;
   segment->stop = stop;
   segment->time = start;
index ac8c07e..2872e4c 100644 (file)
@@ -126,6 +126,7 @@ typedef enum {
  * @GST_SEGMENT_FLAG_RESET: reset the pipeline running_time to the segment
  *                          running_time
  * @GST_SEGMENT_FLAG_SKIP: perform skip playback
+ * @GST_SEGMENT_FLAG_SEGMENT: send SEGMENT_DONE instead of EOS
  *
  * Flags for the GstSegment structure. Currently mapped to the corresponding
  * values of the seek flags.
@@ -134,7 +135,8 @@ typedef enum {
 typedef enum {
   GST_SEGMENT_FLAG_NONE            = GST_SEEK_FLAG_NONE,
   GST_SEGMENT_FLAG_RESET           = GST_SEEK_FLAG_FLUSH,
-  GST_SEGMENT_FLAG_SKIP            = GST_SEEK_FLAG_SKIP
+  GST_SEGMENT_FLAG_SKIP            = GST_SEEK_FLAG_SKIP,
+  GST_SEGMENT_FLAG_SEGMENT         = GST_SEEK_FLAG_SEGMENT
 } GstSegmentFlags;
 
 /**