multiqueue: Don't use random segment.position from upstream

segment.position is meant for internal usage only, but the various
GST_EVENT_SEGMENT creationg/parsing functions won't clear that field.

Use the appropriate segment boundary as an initial value instead
This commit is contained in:
Edward Hervey 2015-12-09 17:40:02 +01:00 committed by Tim-Philipp Müller
parent d1f87286ab
commit 103c919f3c

View file

@ -1068,6 +1068,12 @@ apply_segment (GstMultiQueue * mq, GstSingleQueue * sq, GstEvent * event,
}
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
/* Make sure we have a valid initial segment position (and not garbage
* from upstream) */
if (segment->rate > 0.0)
segment->position = segment->start;
else
segment->position = segment->stop;
if (segment == &sq->sink_segment)
sq->sink_tainted = TRUE;
else {