From 0315b43942b0f646e145ba394afb7e8449af52e8 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 4 Nov 2005 14:35:10 +0000 Subject: [PATCH] gst/base/gstbasesrc.c: Check if we are doing a segment seek and have arrived at the end of that segment. Original commit message from CVS: * gst/base/gstbasesrc.c: (gst_base_src_get_range): Check if we are doing a segment seek and have arrived at the end of that segment. --- ChangeLog | 6 ++++++ gst/base/gstbasesrc.c | 4 ++++ libs/gst/base/gstbasesrc.c | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5045c70..a81b14e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-11-04 Edward Hervey + + * gst/base/gstbasesrc.c: (gst_base_src_get_range): + Check if we are doing a segment seek and have arrived at the + end of that segment. + 2005-11-04 Wim Taymans * gst/gstbus.c: (gst_bus_post), (gst_bus_set_sync_handler): diff --git a/gst/base/gstbasesrc.c b/gst/base/gstbasesrc.c index 2d8b0f7..32811de 100644 --- a/gst/base/gstbasesrc.c +++ b/gst/base/gstbasesrc.c @@ -821,6 +821,10 @@ gst_base_src_get_range (GstBaseSrc * src, guint64 offset, guint length, if (offset > src->size) goto unexpected_length; + /* is segment done ? */ + if (src->segment_loop && (offset > src->segment_end)) + goto unexpected_length; + if (offset + length > src->size) { if (bclass->get_size) bclass->get_size (src, &src->size); diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 2d8b0f7..32811de 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -821,6 +821,10 @@ gst_base_src_get_range (GstBaseSrc * src, guint64 offset, guint length, if (offset > src->size) goto unexpected_length; + /* is segment done ? */ + if (src->segment_loop && (offset > src->segment_end)) + goto unexpected_length; + if (offset + length > src->size) { if (bclass->get_size) bclass->get_size (src, &src->size); -- 2.7.4