mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 06:52:41 +00:00
typefind: answer caps queries with our typefound caps
This avoids merely forwarding the event to the sink, and getting something useless such as ANY. https://bugzilla.gnome.org/show_bug.cgi?id=667571
This commit is contained in:
parent
bf0964b63a
commit
27ac781ba6
1 changed files with 13 additions and 0 deletions
|
@ -381,6 +381,19 @@ gst_type_find_handle_src_query (GstPad * pad, GstObject * parent,
|
||||||
gboolean res = FALSE;
|
gboolean res = FALSE;
|
||||||
|
|
||||||
typefind = GST_TYPE_FIND_ELEMENT (parent);
|
typefind = GST_TYPE_FIND_ELEMENT (parent);
|
||||||
|
GST_DEBUG_OBJECT (typefind, "Handling src query %s",
|
||||||
|
GST_QUERY_TYPE_NAME (query));
|
||||||
|
|
||||||
|
/* We can hijack caps query if we typefind already */
|
||||||
|
if (GST_QUERY_TYPE (query) == GST_QUERY_CAPS) {
|
||||||
|
GST_DEBUG_OBJECT (typefind, "Got caps query, our caps are %" GST_PTR_FORMAT,
|
||||||
|
typefind->caps);
|
||||||
|
if (typefind->caps) {
|
||||||
|
gst_query_set_caps_result (query, typefind->caps);
|
||||||
|
res = TRUE;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
res = gst_pad_peer_query (typefind->sink, query);
|
res = gst_pad_peer_query (typefind->sink, query);
|
||||||
if (!res)
|
if (!res)
|
||||||
|
|
Loading…
Reference in a new issue