gstsegment: Clipping should detect start=stop<segment_start as outside the segment

Before it returned that [start,stop] is inside the segment and that the
difference between segment_start and start needs to be clipped. If the
clipping is done on a buffer (like in baseaudiosink) this will result
in the data pointer being at a invalid memory position.

Fixes bug .
This commit is contained in:
Sebastian Dröge 2009-08-11 12:59:13 +02:00
parent 46b2a5a34e
commit ca8a0376c5

View file

@ -738,7 +738,7 @@ gst_segment_clip (GstSegment * segment, GstFormat format, gint64 start,
/* if a stop position is given and is before the segment start, /* if a stop position is given and is before the segment start,
* we're outside of the segment */ * we're outside of the segment */
if (G_UNLIKELY (stop != -1 && stop != start && stop <= segment->start)) if (G_UNLIKELY (stop != -1 && stop <= segment->start))
return FALSE; return FALSE;
if (clip_start) { if (clip_start) {