segment: also copy the segment flag

Fixes segmented seeks (as tested e.g. in the adder tests in base).
This commit is contained in:
Stefan Sauer 2012-07-09 22:11:31 +02:00
parent a8d5665db7
commit f165a77fdc
2 changed files with 5 additions and 1 deletions

View 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;

View 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;
/**