mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
basesrc: handle NULL from getcaps
If the getcaps functions returns NULL, return FALSE from the CAPS query.
This commit is contained in:
parent
acf0d50bf1
commit
c6ac51e729
1 changed files with 7 additions and 4 deletions
|
@ -1178,10 +1178,13 @@ gst_base_src_default_query (GstBaseSrc * src, GstQuery * query)
|
|||
bclass = GST_BASE_SRC_GET_CLASS (src);
|
||||
if (bclass->get_caps) {
|
||||
gst_query_parse_caps (query, &filter);
|
||||
caps = bclass->get_caps (src, filter);
|
||||
if ((caps = bclass->get_caps (src, filter))) {
|
||||
gst_query_set_caps_result (query, caps);
|
||||
gst_caps_unref (caps);
|
||||
res = TRUE;
|
||||
} else {
|
||||
res = FALSE;
|
||||
}
|
||||
} else
|
||||
res = FALSE;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue