gst/autoplug/gstspideridentity.c: use get_allowed_caps, not get_caps (fixes #132519)

Original commit message from CVS:
2004-02-04  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* gst/autoplug/gstspideridentity.c:
(gst_spider_identity_sink_loop_type_finding):
use get_allowed_caps, not get_caps (fixes #132519)
* gst/elements/gsttypefind.c: (stop_typefinding):
use correct order when sending buffers and seeking
This commit is contained in:
Benjamin Otte 2004-02-04 22:16:30 +00:00
parent 2c8574e0aa
commit 5554f286bd
4 changed files with 22 additions and 12 deletions

View file

@ -1,3 +1,11 @@
2004-02-04 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/autoplug/gstspideridentity.c:
(gst_spider_identity_sink_loop_type_finding):
use get_allowed_caps, not get_caps (fixes #132519)
* gst/elements/gsttypefind.c: (stop_typefinding):
use correct order when sending buffers and seeking
2004-02-04 Thomas Vander Stichele <thomas at apestaart dot org>
* configure.ac:

View file

@ -471,8 +471,8 @@ gst_spider_identity_sink_loop_type_finding (GstSpiderIdentity *ident)
find.buffer = GST_BUFFER (data);
/* maybe there are already valid caps now? */
find.caps = gst_pad_get_caps (ident->sink);
if (! gst_caps_is_empty (find.caps) && !gst_caps_is_any (find.caps)) {
find.caps = gst_pad_get_allowed_caps (ident->sink);
if (!gst_caps_is_empty (find.caps) && !gst_caps_is_any (find.caps)) {
goto plug;
} else {
gst_caps_free (find.caps);

View file

@ -336,16 +336,17 @@ stop_typefinding (GstTypeFindElement *typefind)
GstBuffer *buffer;
guint size = gst_buffer_store_get_size (typefind->store, 0);
if (size && (buffer = gst_buffer_store_get_buffer (typefind->store, 0, size))) {
GST_LOG_OBJECT (typefind, "pushing cached data (%u bytes)", size);
gst_pad_push (typefind->src, GST_DATA (buffer));
} else {
size = 0;
}
GST_LOG_OBJECT (typefind, "seeking back to current position %u", size);
if (!gst_pad_send_event (GST_PAD_PEER (typefind->sink),
gst_event_new_seek (GST_SEEK_METHOD_SET | GST_FORMAT_BYTES, size))) {
GST_WARNING_OBJECT (typefind, "could not seek to required position %u, hope for the best", size);
}
if (size && (buffer = gst_buffer_store_get_buffer (typefind->store, 0, size))) {
gst_pad_push (typefind->src, GST_DATA (buffer));
} else {
size = 0;
}
}
gst_buffer_store_clear (typefind->store);
}

View file

@ -336,16 +336,17 @@ stop_typefinding (GstTypeFindElement *typefind)
GstBuffer *buffer;
guint size = gst_buffer_store_get_size (typefind->store, 0);
if (size && (buffer = gst_buffer_store_get_buffer (typefind->store, 0, size))) {
GST_LOG_OBJECT (typefind, "pushing cached data (%u bytes)", size);
gst_pad_push (typefind->src, GST_DATA (buffer));
} else {
size = 0;
}
GST_LOG_OBJECT (typefind, "seeking back to current position %u", size);
if (!gst_pad_send_event (GST_PAD_PEER (typefind->sink),
gst_event_new_seek (GST_SEEK_METHOD_SET | GST_FORMAT_BYTES, size))) {
GST_WARNING_OBJECT (typefind, "could not seek to required position %u, hope for the best", size);
}
if (size && (buffer = gst_buffer_store_get_buffer (typefind->store, 0, size))) {
gst_pad_push (typefind->src, GST_DATA (buffer));
} else {
size = 0;
}
}
gst_buffer_store_clear (typefind->store);
}