element-monitor: protect agains elements that have no klass

This commit is contained in:
Edward Hervey 2013-09-02 12:11:25 -03:00 committed by Thiago Santos
parent ea903da1c7
commit fb58e16c5a

View file

@ -132,9 +132,12 @@ gst_validate_element_monitor_inspect (GstValidateElementMonitor * monitor)
klassname =
gst_element_class_get_metadata (klass, GST_ELEMENT_METADATA_KLASS);
monitor->is_decoder = strstr (klassname, "Decoder") != NULL;
monitor->is_encoder = strstr (klassname, "Encoder") != NULL;
monitor->is_demuxer = strstr (klassname, "Demuxer") != NULL;
if (klassname) {
monitor->is_decoder = strstr (klassname, "Decoder") != NULL;
monitor->is_encoder = strstr (klassname, "Encoder") != NULL;
monitor->is_demuxer = strstr (klassname, "Demuxer") != NULL;
} else
GST_ERROR_OBJECT (element, "no klassname");
}
static gboolean