Skip to content
Snippets Groups Projects
Commit c697912f authored by Nicolas Dufresne's avatar Nicolas Dufresne Committed by Wim Taymans
Browse files

segment: Fix seeking when position is slightly outside the segment

Very often, when the end of a segment is detected by demuxer, the position
is slightly outside the segment boundaries. Currently, if that is the case
the base will be set to NONE instead of normal accumulation. This would
break non-flushing seeks in oggdemux and most likely other demuxers.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=696899
parent a45d8c9d
No related branches found
No related tags found
No related merge requests found
......@@ -309,6 +309,9 @@ gst_segment_do_seek (GstSegment * segment, gdouble rate,
/* flush resets the running_time */
base = 0;
} else {
/* make sure the position is inside the segment start/stop */
position = CLAMP (position, segment->start, segment->stop);
/* remember the elapsed time */
base = gst_segment_to_running_time (segment, format, position);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment