gstpad: Probes that return HANDLED can reset the data info field
[platform/upstream/gstreamer.git] / gst / gsttracerrecord.c
index 889479d..639a4cc 100644 (file)
@@ -178,7 +178,7 @@ gst_tracer_record_init (GstTracerRecord * self)
  *
  * > Please note that this is still under discussion and subject to change.
  *
- * Returns: (transfer floating): a new #GstTracerRecord
+ * Returns: (transfer full): a new #GstTracerRecord
  */
 GstTracerRecord *
 gst_tracer_record_new (const gchar * name, const gchar * firstfield, ...)
@@ -208,6 +208,7 @@ gst_tracer_record_new (const gchar * name, const gchar * firstfield, ...)
     G_VALUE_COLLECT_INIT (&val, type, varargs, G_VALUE_NOCOPY_CONTENTS, &err);
     if (G_UNLIKELY (err)) {
       g_critical ("%s", err);
+      g_free (err);
       break;
     }
     /* see boxed_proxy_collect_value */
@@ -219,6 +220,10 @@ gst_tracer_record_new (const gchar * name, const gchar * firstfield, ...)
   va_end (varargs);
 
   self = g_object_new (GST_TYPE_TRACER_RECORD, NULL);
+
+  /* Clear floating flag */
+  gst_object_ref_sink (self);
+
   self->spec = structure;
   gst_tracer_record_build_format (self);