mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
gst/elements/gstbufferstore.c: when the buffer is complete, don't check if other buffers are needed
Original commit message from CVS: * gst/elements/gstbufferstore.c: (gst_buffer_store_get_buffer): when the buffer is complete, don't check if other buffers are needed * gst/elements/gstfilesrc.c: (gst_filesrc_srcpad_event): check that the offset is >0 so we don't try to read before the beginning of the file * gst/gstpad.c: (gst_pad_set_pad_template): sink the template, so we don't end up with 130k pad templates
This commit is contained in:
parent
beb197fd35
commit
6e56b1be99
6 changed files with 21 additions and 5 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-04-07 Benjamin Otte <otte@gnome.org>
|
||||
|
||||
* gst/elements/gstbufferstore.c: (gst_buffer_store_get_buffer):
|
||||
when the buffer is complete, don't check if other buffers are needed
|
||||
* gst/elements/gstfilesrc.c: (gst_filesrc_srcpad_event):
|
||||
check that the offset is >0 so we don't try to read before the
|
||||
beginning of the file
|
||||
* gst/gstpad.c: (gst_pad_set_pad_template):
|
||||
sink the template, so we don't end up with 130k pad templates
|
||||
|
||||
2004-04-06 Benjamin Otte <otte@gnome.org>
|
||||
|
||||
* gst/autoplug/gstspider.c: (gst_spider_link_add):
|
||||
|
|
|
@ -395,6 +395,7 @@ gst_buffer_store_get_buffer (GstBufferStore * store, guint64 offset, guint size)
|
|||
data += tmp;
|
||||
size -= tmp;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
if (!have_offset) {
|
||||
cur_offset += GST_BUFFER_SIZE (current);
|
||||
|
|
|
@ -860,8 +860,9 @@ gst_filesrc_srcpad_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
switch (GST_EVENT_SEEK_METHOD (event)) {
|
||||
case GST_SEEK_METHOD_SET:
|
||||
if (offset > src->filelen && (!gst_filesrc_check_filesize (src)
|
||||
|| offset > src->filelen)) {
|
||||
if (offset < 0 ||
|
||||
(offset > src->filelen && (!gst_filesrc_check_filesize (src)
|
||||
|| offset > src->filelen))) {
|
||||
goto error;
|
||||
}
|
||||
src->curoffset = offset;
|
||||
|
|
|
@ -1838,9 +1838,11 @@ gst_pad_set_pad_template (GstPad * pad, GstPadTemplate * templ)
|
|||
|
||||
gst_object_replace ((GstObject **) & pad->padtemplate, (GstObject *) templ);
|
||||
|
||||
if (templ)
|
||||
if (templ) {
|
||||
gst_object_sink (GST_OBJECT (templ));
|
||||
g_signal_emit (G_OBJECT (templ),
|
||||
gst_pad_template_signals[TEMPL_PAD_CREATED], 0, pad);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -395,6 +395,7 @@ gst_buffer_store_get_buffer (GstBufferStore * store, guint64 offset, guint size)
|
|||
data += tmp;
|
||||
size -= tmp;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
if (!have_offset) {
|
||||
cur_offset += GST_BUFFER_SIZE (current);
|
||||
|
|
|
@ -860,8 +860,9 @@ gst_filesrc_srcpad_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
switch (GST_EVENT_SEEK_METHOD (event)) {
|
||||
case GST_SEEK_METHOD_SET:
|
||||
if (offset > src->filelen && (!gst_filesrc_check_filesize (src)
|
||||
|| offset > src->filelen)) {
|
||||
if (offset < 0 ||
|
||||
(offset > src->filelen && (!gst_filesrc_check_filesize (src)
|
||||
|| offset > src->filelen))) {
|
||||
goto error;
|
||||
}
|
||||
src->curoffset = offset;
|
||||
|
|
Loading…
Reference in a new issue