mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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:
parent
002cfd00b7
commit
3362dceb25
1 changed files with 8 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue