Commit 8b6e8701 authored by Nicolas Dufresne's avatar Nicolas Dufresne
Browse files

baseparse: Fix extrapolation of seeksegment.stop

The stop shall be relative to start if extrapolated from the
duration.

https://bugzilla.gnome.org/show_bug.cgi?id=750783
parent eedd9cb7
......@@ -4334,8 +4334,9 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event)
else
startpos -= parse->priv->lead_in_ts;
if (seeksegment.stop == -1)
seeksegment.stop = seeksegment.duration;
if (seeksegment.stop == -1 && seeksegment.duration != -1)
seeksegment.stop = seeksegment.start + seeksegment.duration;
seekpos = gst_base_parse_find_offset (parse, startpos, TRUE, &start_ts);
seekstop = gst_base_parse_find_offset (parse, seeksegment.stop, FALSE,
NULL);
......@@ -4346,8 +4347,9 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event)
else
start_ts = start;
if (seeksegment.stop == -1)
seeksegment.stop = seeksegment.duration;
if (seeksegment.stop == -1 && seeksegment.duration != -1)
seeksegment.stop = seeksegment.start + seeksegment.duration;
if (!gst_base_parse_convert (parse, format, start_ts,
GST_FORMAT_BYTES, &seekpos))
goto convert_failed;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment