summaryrefslogtreecommitdiff
path: root/gst/avi
diff options
context:
space:
mode:
authorMark Nauwelaerts <mnauw@users.sourceforge.net>2016-12-28 13:23:11 +0100
committerMark Nauwelaerts <mnauw@users.sourceforge.net>2016-12-28 13:59:30 +0100
commit3362dceb25005635464e2413db8c6b35833fefd1 (patch)
tree0878f6bccc42e2549d55851310d5df8c602c747b /gst/avi
parent002cfd00b74ee662c2be0e0e44e3113acb3e6e0a (diff)
downloadgstreamer-plugins-good-3362dceb25005635464e2413db8c6b35833fefd1.tar.gz
avidemux: correctly perform pull mode KEY_UNIT seeking
Rather amazingly (and equally unnoticed), keyunit seeking resulted in segments where start != time (which is bogus for simple avi timeline). So, properly adjust the segment (start) rather than fiddling with segment time (only).
Diffstat (limited to 'gst/avi')
-rw-r--r--gst/avi/gstavidemux.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index 245a69163..39641634e 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -4499,14 +4499,16 @@ gst_avi_demux_do_seek (GstAviDemux * avi, GstSegment * segment,
seek_time = stream->current_timestamp;
GST_DEBUG_OBJECT (avi, "keyframe adjusted to %" GST_TIME_FORMAT,
GST_TIME_ARGS (seek_time));
+ /* the seek time is always the position ... */
+ segment->position = seek_time;
+ /* ... and start and stream time when going forwards,
+ * otherwise only stop time */
+ if (segment->rate > 0.0)
+ segment->start = segment->time = seek_time;
+ else
+ segment->stop = seek_time;
}
- /* the seek time is also the position and stream time when going
- * forwards */
- segment->position = seek_time;
- if (segment->rate > 0.0)
- segment->time = seek_time;
-
/* now set DISCONT and align the other streams */
for (i = 0; i < avi->num_streams; i++) {
GstAviStream *ostream;