element-monitor: protect agains elements that have no klass
This commit is contained in:
parent
ea903da1c7
commit
fb58e16c5a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user