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).
This commit is contained in:
Mark Nauwelaerts 2016-12-28 13:23:11 +01:00
parent 002cfd00b7
commit 3362dceb25

View file

@ -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;