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 =
|
klassname =
|
||||||
gst_element_class_get_metadata (klass, GST_ELEMENT_METADATA_KLASS);
|
gst_element_class_get_metadata (klass, GST_ELEMENT_METADATA_KLASS);
|
||||||
|
if (klassname) {
|
||||||
monitor->is_decoder = strstr (klassname, "Decoder") != NULL;
|
monitor->is_decoder = strstr (klassname, "Decoder") != NULL;
|
||||||
monitor->is_encoder = strstr (klassname, "Encoder") != NULL;
|
monitor->is_encoder = strstr (klassname, "Encoder") != NULL;
|
||||||
monitor->is_demuxer = strstr (klassname, "Demuxer") != NULL;
|
monitor->is_demuxer = strstr (klassname, "Demuxer") != NULL;
|
||||||
|
} else
|
||||||
|
GST_ERROR_OBJECT (element, "no klassname");
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
x
Reference in New Issue
Block a user