mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
gst/base/gstbasesrc.c: Set the segment_end to -1 initially. Fixed typefind.
Original commit message from CVS: * gst/base/gstbasesrc.c: (gst_base_src_init), (gst_base_src_get_range): Set the segment_end to -1 initially. Fixed typefind.
This commit is contained in:
parent
9fa579c299
commit
b03c54d446
3 changed files with 20 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-11-07 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/base/gstbasesrc.c: (gst_base_src_init),
|
||||
(gst_base_src_get_range):
|
||||
Set the segment_end to -1 initially. Fixed typefind.
|
||||
|
||||
2005-11-07 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/base/gstadapter.c:
|
||||
|
|
|
@ -218,6 +218,8 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class)
|
|||
|
||||
basesrc->blocksize = DEFAULT_BLOCKSIZE;
|
||||
basesrc->clock_id = NULL;
|
||||
basesrc->segment_start = 0;
|
||||
basesrc->segment_end = -1;
|
||||
|
||||
GST_OBJECT_FLAG_UNSET (basesrc, GST_BASE_SRC_STARTED);
|
||||
|
||||
|
@ -813,10 +815,6 @@ gst_base_src_get_range (GstBaseSrc * src, guint64 offset, guint length,
|
|||
if (G_UNLIKELY (!bclass->create))
|
||||
goto no_function;
|
||||
|
||||
GST_DEBUG_OBJECT (src,
|
||||
"reading offset %" G_GUINT64_FORMAT ", length %u, size %"
|
||||
G_GINT64_FORMAT, offset, length, src->size);
|
||||
|
||||
/* the max amount of bytes to read is the total size or
|
||||
* up to the segment_end if present. */
|
||||
if (src->segment_end != -1)
|
||||
|
@ -824,6 +822,11 @@ gst_base_src_get_range (GstBaseSrc * src, guint64 offset, guint length,
|
|||
else
|
||||
maxsize = src->size;
|
||||
|
||||
GST_DEBUG_OBJECT (src,
|
||||
"reading offset %" G_GUINT64_FORMAT ", length %u, size %" G_GINT64_FORMAT
|
||||
", segment_end %" G_GINT64_FORMAT ", maxsize %" G_GINT64_FORMAT, offset,
|
||||
length, src->size, src->segment_end, maxsize);
|
||||
|
||||
/* check size */
|
||||
if (maxsize != -1) {
|
||||
if (offset > maxsize)
|
||||
|
|
|
@ -218,6 +218,8 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class)
|
|||
|
||||
basesrc->blocksize = DEFAULT_BLOCKSIZE;
|
||||
basesrc->clock_id = NULL;
|
||||
basesrc->segment_start = 0;
|
||||
basesrc->segment_end = -1;
|
||||
|
||||
GST_OBJECT_FLAG_UNSET (basesrc, GST_BASE_SRC_STARTED);
|
||||
|
||||
|
@ -813,10 +815,6 @@ gst_base_src_get_range (GstBaseSrc * src, guint64 offset, guint length,
|
|||
if (G_UNLIKELY (!bclass->create))
|
||||
goto no_function;
|
||||
|
||||
GST_DEBUG_OBJECT (src,
|
||||
"reading offset %" G_GUINT64_FORMAT ", length %u, size %"
|
||||
G_GINT64_FORMAT, offset, length, src->size);
|
||||
|
||||
/* the max amount of bytes to read is the total size or
|
||||
* up to the segment_end if present. */
|
||||
if (src->segment_end != -1)
|
||||
|
@ -824,6 +822,11 @@ gst_base_src_get_range (GstBaseSrc * src, guint64 offset, guint length,
|
|||
else
|
||||
maxsize = src->size;
|
||||
|
||||
GST_DEBUG_OBJECT (src,
|
||||
"reading offset %" G_GUINT64_FORMAT ", length %u, size %" G_GINT64_FORMAT
|
||||
", segment_end %" G_GINT64_FORMAT ", maxsize %" G_GINT64_FORMAT, offset,
|
||||
length, src->size, src->segment_end, maxsize);
|
||||
|
||||
/* check size */
|
||||
if (maxsize != -1) {
|
||||
if (offset > maxsize)
|
||||
|
|
Loading…
Reference in a new issue