plugins/elements/gsttypefindelement.c: Now that we're not leaking factories, make...
authorMichael Smith <msmith@xiph.org>
Mon, 12 Dec 2005 12:32:04 +0000 (12:32 +0000)
committerMichael Smith <msmith@xiph.org>
Mon, 12 Dec 2005 12:32:04 +0000 (12:32 +0000)
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c: (free_entry),
(gst_type_find_element_chain):
Now that we're not leaking factories, make sure we keep references
to them while we need them.

ChangeLog
plugins/elements/gsttypefindelement.c

index cef4754..ce30a42 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-12  Michael Smith  <msmith@fluendo.com>
+
+       * plugins/elements/gsttypefindelement.c: (free_entry),
+       (gst_type_find_element_chain):
+         Now that we're not leaking factories, make sure we keep references
+         to them while we need them.
+
 2005-12-12  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * tests/check/gst/struct_i386.h:
index fac82d5..9eb4374 100644 (file)
@@ -393,6 +393,7 @@ free_entry (TypeFindEntry * entry)
 {
   if (entry->caps)
     gst_caps_unref (entry->caps);
+  gst_object_unref (entry->factory);
   g_free (entry);
 }
 static void
@@ -632,7 +633,7 @@ gst_type_find_element_chain (GstPad * pad, GstBuffer * buffer)
         while (walk) {
           entry = new_entry ();
 
-          entry->factory = GST_TYPE_FIND_FACTORY (walk->data);
+          entry->factory = gst_object_ref (GST_TYPE_FIND_FACTORY (walk->data));
           entry->self = typefind;
           entry->probability = 0;
           typefind->possibilities =