tsdemux: Do not tweak segments on reverse playback

We can't compare the first buffer start and the segment start in that
case... playback is going backward!

https://bugzilla.gnome.org/show_bug.cgi?id=734445
This commit is contained in:
Thibault Saunier 2014-08-05 17:13:13 +02:00 committed by Thibault Saunier
parent 03b70aecec
commit 03031037fa

View file

@ -1965,10 +1965,13 @@ calculate_and_push_newsegment (GstTSDemux * demux, TSDemuxStream * stream)
}
} else if (demux->segment.start < firstts) {
/* Take into account the offset to the first buffer timestamp */
if (GST_CLOCK_TIME_IS_VALID (demux->segment.stop))
demux->segment.stop += firstts - demux->segment.start;
demux->segment.position = firstts;
demux->segment.start = firstts;
if (demux->segment.rate > 0) {
demux->segment.start = firstts;
if (GST_CLOCK_TIME_IS_VALID (demux->segment.stop) )
demux->segment.stop += firstts - demux->segment.start;
demux->segment.position = firstts;
}
}
if (!demux->segment_event) {