qtdemux: fix reverse playback

When performing seek, segment->start is being updated with desired_offset,
but in case of reverse playback segment->start should be 0 and
segment->stop should be updated with desired offset.

https://bugzilla.gnome.org/show_bug.cgi?id=750675
This commit is contained in:
Vineeth TM 2015-06-10 09:49:47 +09:00 committed by Sebastian Dröge
parent 95bab88225
commit 720ff75c72

View file

@ -1432,11 +1432,15 @@ gst_qtdemux_perform_seek (GstQTDemux * qtdemux, GstSegment * segment,
} }
segment->position = desired_offset; segment->position = desired_offset;
segment->time = desired_offset; segment->time = desired_offset;
segment->start = desired_offset; if (segment->rate >= 0) {
segment->start = desired_offset;
/* we stop at the end */ /* we stop at the end */
if (segment->stop == -1) if (segment->stop == -1)
segment->stop = segment->duration; segment->stop = segment->duration;
} else {
segment->stop = desired_offset;
}
if (qtdemux->fragmented) if (qtdemux->fragmented)
qtdemux->fragmented_seek_pending = TRUE; qtdemux->fragmented_seek_pending = TRUE;