gstfunnel: avoid access of freed pad
[platform/upstream/gstreamer.git] / gst / gstregistrychunks.c
index b377b94..683738d 100644 (file)
@@ -324,7 +324,7 @@ gst_registry_chunks_save_feature (GList ** list, GstPluginFeature * feature)
       GstCaps *fcaps = gst_caps_ref (factory->caps);
       /* we simplify the caps before saving. This is a lot faster
        * when loading them later on */
-      fcaps = gst_caps_do_simplify (fcaps);
+      fcaps = gst_caps_simplify (fcaps);
       str = gst_caps_to_string (fcaps);
       gst_caps_unref (fcaps);
 
@@ -768,7 +768,7 @@ _priv_gst_registry_chunks_load_plugin (GstRegistry * registry, gchar ** in,
   plugin = g_object_newv (GST_TYPE_PLUGIN, 0, NULL);
 
   /* TODO: also set GST_PLUGIN_FLAG_CONST */
-  plugin->flags |= GST_PLUGIN_FLAG_CACHED;
+  GST_OBJECT_FLAG_SET (plugin, GST_PLUGIN_FLAG_CACHED);
   plugin->file_mtime = pe->file_mtime;
   plugin->file_size = pe->file_size;
 
@@ -804,7 +804,7 @@ _priv_gst_registry_chunks_load_plugin (GstRegistry * registry, gchar ** in,
   /* If the license string is 'BLACKLIST', mark this as a blacklisted
    * plugin */
   if (strcmp (plugin->desc.license, "BLACKLIST") == 0)
-    plugin->flags |= GST_PLUGIN_FLAG_BLACKLISTED;
+    GST_OBJECT_FLAG_SET (plugin, GST_PLUGIN_FLAG_BLACKLISTED);
 
   plugin->basename = g_path_get_basename (plugin->filename);