mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
autoconvert: Look at all possibilities for accept-caps even if there is a selected subelement
If the accept-caps succeeds with a different subelement, then the subsequent caps event will change the current subelement.
This commit is contained in:
parent
60739b828d
commit
977f84d272
1 changed files with 26 additions and 17 deletions
|
@ -1039,7 +1039,19 @@ gst_auto_convert_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||||
|
|
||||||
gst_object_unref (sub_sinkpad);
|
gst_object_unref (sub_sinkpad);
|
||||||
gst_object_unref (subelement);
|
gst_object_unref (subelement);
|
||||||
} else {
|
|
||||||
|
if (ret && GST_QUERY_TYPE (query) == GST_QUERY_ACCEPT_CAPS) {
|
||||||
|
gboolean res;
|
||||||
|
gst_query_parse_accept_caps_result (query, &res);
|
||||||
|
|
||||||
|
if (!res)
|
||||||
|
goto ignore_acceptcaps_failure;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ignore_acceptcaps_failure:
|
||||||
|
|
||||||
if (GST_QUERY_TYPE (query) == GST_QUERY_ACCEPT_CAPS) {
|
if (GST_QUERY_TYPE (query) == GST_QUERY_ACCEPT_CAPS) {
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
GstCaps *accept_caps;
|
GstCaps *accept_caps;
|
||||||
|
@ -1057,10 +1069,7 @@ gst_auto_convert_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||||
GST_WARNING_OBJECT (autoconvert, "Got query %s while no element was"
|
GST_WARNING_OBJECT (autoconvert, "Got query %s while no element was"
|
||||||
" selected, letting through",
|
" selected, letting through",
|
||||||
gst_query_type_get_name (GST_QUERY_TYPE (query)));
|
gst_query_type_get_name (GST_QUERY_TYPE (query)));
|
||||||
ret = gst_pad_peer_query (autoconvert->srcpad, query);
|
return gst_pad_peer_query (autoconvert->srcpad, query);
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue