Only update the last_stop value when we had a valid stop position for the
clipping or else the clipping code assumes the stop position extends to the end
of the segment, which makes the position reporting return weird values.
}
/* set last stop position */
- if (G_LIKELY (cstop != GST_CLOCK_TIME_NONE))
+ if (G_LIKELY (stop != GST_CLOCK_TIME_NONE && cstop != GST_CLOCK_TIME_NONE))
gst_segment_set_last_stop (segment, GST_FORMAT_TIME, cstop);
else
gst_segment_set_last_stop (segment, GST_FORMAT_TIME, cstart);