binary registry: Don't attempt to parse empty caps

This commit is contained in:
Stefan Kost 2009-02-25 10:51:57 +02:00
parent 70fcf4a201
commit 6911aa59be

View file

@ -958,7 +958,7 @@ gst_registry_binary_load_feature (GstRegistry * registry, gchar ** in,
/* load caps */
unpack_string (*in, str);
factory->caps = (g_str_equal (str, "")) ? NULL : gst_caps_from_string (str);
factory->caps = (str && *str) ? gst_caps_from_string (str) : NULL;
g_free (str);
/* load extensions */
if (tff->nextensions) {