summaryrefslogtreecommitdiff
path: root/gst/gstsegment.c
diff options
context:
space:
mode:
authorSeungha Yang <sh.yang@lge.com>2016-04-15 20:54:42 +0900
committerEdward Hervey <bilboed@bilboed.com>2017-01-31 15:55:12 +0100
commit15f2898e872d3b7ce74ea5fbd35fac9f1f47b4a5 (patch)
tree055660244859a6742ab4a33634b7771101358adf /gst/gstsegment.c
parent94da8f5d8dbc9308abaec5b1c450c4c39d452e21 (diff)
segment: Modifiy inside segment condition
There is a special case that segment_start == segment_stop == start. It's inside of segment https://bugzilla.gnome.org/show_bug.cgi?id=764707
Diffstat (limited to 'gst/gstsegment.c')
-rw-r--r--gst/gstsegment.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/gstsegment.c b/gst/gstsegment.c
index 8d4183ea44..8db09df3b1 100644
--- a/gst/gstsegment.c
+++ b/gst/gstsegment.c
@@ -884,8 +884,11 @@ gst_segment_clip (const GstSegment * segment, GstFormat format, guint64 start,
g_return_val_if_fail (segment->format == format, FALSE);
/* if we have a stop position and a valid start and start is bigger,
- * we're outside of the segment */
- if (G_UNLIKELY (segment->stop != -1 && start != -1 && start >= segment->stop))
+ * we're outside of the segment. (Special case) segment start and
+ * segment stop can be identical. In this case, if start is also identical,
+ * it's inside of segment */
+ if (G_UNLIKELY (segment->stop != -1 && start != -1 && (start > segment->stop
+ || (segment->start != segment->stop && start == segment->stop))))
return FALSE;
/* if a stop position is given and is before the segment start,