mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
plugins/elements/gsttypefindelement.c: Do not typefind content if the buffers already have caps. and the right thing ...
Original commit message from CVS: * plugins/elements/gsttypefindelement.c: (gst_type_find_element_chain): Do not typefind content if the buffers already have caps. Neccesary for icydemux (#333657), and the right thing to do anyway.
This commit is contained in:
parent
0a4ba6610f
commit
5b86e7bf4e
3 changed files with 32 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-03-31 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
|
* plugins/elements/gsttypefindelement.c:
|
||||||
|
(gst_type_find_element_chain):
|
||||||
|
Do not typefind content if the buffers already have caps.
|
||||||
|
Neccesary for icydemux (#333657), and the right thing to do anyway.
|
||||||
|
|
||||||
2006-03-30 Wim Taymans <wim@fluendo.com>
|
2006-03-30 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* libs/gst/base/gstbasesink.c: (gst_base_sink_init),
|
* libs/gst/base/gstbasesink.c: (gst_base_sink_init),
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit 45cc64e522d61410eb8d1a3e7ef67569851cd77a
|
Subproject commit c18b429f2a3698b6fc5e849a637aa0c8b91e82b9
|
|
@ -534,6 +534,30 @@ gst_type_find_element_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
|
|
||||||
typefind = GST_TYPE_FIND_ELEMENT (GST_PAD_PARENT (pad));
|
typefind = GST_TYPE_FIND_ELEMENT (GST_PAD_PARENT (pad));
|
||||||
|
|
||||||
|
/* Shortcircuit typefinding if we already have non-any caps */
|
||||||
|
if (typefind->mode == MODE_TYPEFIND) {
|
||||||
|
GstCaps *caps = gst_buffer_get_caps (buffer);
|
||||||
|
|
||||||
|
if (caps) {
|
||||||
|
if (gst_caps_is_any (caps)) {
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
} else {
|
||||||
|
typefind->mode = MODE_NORMAL;
|
||||||
|
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE], 0,
|
||||||
|
GST_TYPE_FIND_MAXIMUM, caps);
|
||||||
|
|
||||||
|
if (typefind->store) {
|
||||||
|
GST_DEBUG_OBJECT (typefind, "Pushing store: %d",
|
||||||
|
GST_BUFFER_SIZE (typefind->store));
|
||||||
|
gst_type_find_element_send_cached_events (typefind);
|
||||||
|
gst_buffer_set_caps (typefind->store, typefind->caps);
|
||||||
|
gst_pad_push (typefind->src, typefind->store);
|
||||||
|
typefind->store = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (typefind->mode) {
|
switch (typefind->mode) {
|
||||||
case MODE_ERROR:
|
case MODE_ERROR:
|
||||||
/* we should already have called GST_ELEMENT_ERROR */
|
/* we should already have called GST_ELEMENT_ERROR */
|
||||||
|
|
Loading…
Reference in a new issue