if (factory->caps) {
/* we copy the caps here so we can simplify them before saving. This
* is a lot faster when loading them later on */
- GstCaps *copy = gst_caps_copy (factory->caps);
-
- gst_caps_do_simplify (copy);
- str = gst_caps_to_string (copy);
- gst_caps_unref (copy);
+ if (!gst_caps_is_fixed (factory->caps)) {
+ GstCaps *copy = gst_caps_copy (factory->caps);
+ gst_caps_do_simplify (copy);
+ str = gst_caps_to_string (copy);
+ gst_caps_unref (copy);
+ } else {
+ str = gst_caps_to_string (factory->caps);
+ }
gst_registry_chunks_save_string (list, str);
} else {
gst_registry_chunks_save_const_string (list, "");