Original commit message from CVS:
Patch by: Jonathan Matthew <jonathan at kaolin dot wh9 dot net>
* libs/gst/base/gstbasesrc.c: (gst_base_src_update_length):
Store new length in segment duration so we don't keep on calling the
potentially expensize get_size() call. Fixes #370865.
+2006-11-13 Wim Taymans <wim@fluendo.com>
+
+ Patch by: Jonathan Matthew <jonathan at kaolin dot wh9 dot net>
+
+ * libs/gst/base/gstbasesrc.c: (gst_base_src_update_length):
+ Store new length in segment duration so we don't keep on calling the
+ potentially expensize get_size() call. Fixes #370865.
+
2006-11-10 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Sergey Scobich <sergery.scobich at gmail com>
if (G_UNLIKELY (offset + *length >= maxsize)) {
/* see if length of the file changed */
if (bclass->get_size)
- bclass->get_size (src, &size);
+ if (!bclass->get_size (src, &size))
+ size = -1;
+
+ gst_segment_set_duration (&src->segment, GST_FORMAT_BYTES, size);
/* make sure we don't exceed the configured segment stop
* if it was set */
/* else we can clip to the end */
if (G_UNLIKELY (offset + *length >= maxsize))
*length = maxsize - offset;
+
}
}