mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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:
parent
2d427c75ae
commit
5f1764232f
1 changed files with 6 additions and 0 deletions
|
@ -1217,6 +1217,12 @@ apply_segment (GstMultiQueue * mq, GstSingleQueue * sq, GstEvent * event,
|
||||||
}
|
}
|
||||||
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
|
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)
|
if (segment == &sq->sink_segment)
|
||||||
sq->sink_tainted = TRUE;
|
sq->sink_tainted = TRUE;
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue