From 720ff75c72b7866007cc9a166993b3c76639913e Mon Sep 17 00:00:00 2001 From: Vineeth TM Date: Wed, 10 Jun 2015 09:49:47 +0900 Subject: [PATCH] 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 --- gst/isomp4/qtdemux.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 2b771aea2d..07b8b84b6d 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -1432,11 +1432,15 @@ gst_qtdemux_perform_seek (GstQTDemux * qtdemux, GstSegment * segment, } segment->position = desired_offset; segment->time = desired_offset; - segment->start = desired_offset; + if (segment->rate >= 0) { + segment->start = desired_offset; - /* we stop at the end */ - if (segment->stop == -1) - segment->stop = segment->duration; + /* we stop at the end */ + if (segment->stop == -1) + segment->stop = segment->duration; + } else { + segment->stop = desired_offset; + } if (qtdemux->fragmented) qtdemux->fragmented_seek_pending = TRUE;