mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
element-monitor: protect agains elements that have no klass
This commit is contained in:
parent
ea903da1c7
commit
fb58e16c5a
1 changed files with 6 additions and 3 deletions
|
@ -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…
Reference in a new issue