autoconvert: Fix the way we compare element types

We used to conside elements that were subclassses of another
element type as being the same (for example with videoconvertscale,
bother videoconvert and videoscale are subclasses of videoconvertscale
and that code was lost)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/899>
This commit is contained in:
Thibault Saunier 2021-05-21 22:25:15 -04:00 committed by GStreamer Marge Bot
parent 17029974e0
commit a0a9e9e3cf

View file

@ -436,7 +436,7 @@ gst_auto_convert_get_element_by_type (GstAutoConvert * autoconvert, GType type)
GST_OBJECT_LOCK (autoconvert);
for (item = bin->children; item; item = item->next) {
if (G_TYPE_CHECK_INSTANCE_TYPE (item->data, type)) {
if (G_OBJECT_TYPE(item->data) == type) {
element = gst_object_ref (item->data);
break;
}