Commit c6ac51e7 authored by Wim Taymans's avatar Wim Taymans

basesrc: handle NULL from getcaps

If the getcaps functions returns NULL, return FALSE from the CAPS query.
parent acf0d50b
......@@ -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);
gst_query_set_caps_result (query, caps);
gst_caps_unref (caps);
res = TRUE;
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment