dataurisrc: fix leak as gst_buffer_replace adds its own ref
authorThiago Santos <ts.santos@sisa.samsung.com>
Sat, 28 Jun 2014 12:35:21 +0000 (09:35 -0300)
committerThiago Santos <ts.santos@sisa.samsung.com>
Sat, 28 Jun 2014 12:44:22 +0000 (09:44 -0300)
So unref the buffer after that otherwise it leaks

gst/dataurisrc/gstdataurisrc.c

index e71d58b..ba8b9a3 100644 (file)
@@ -411,6 +411,7 @@ gst_data_uri_src_set_uri (GstURIHandler * handler, const gchar * uri,
 
   GST_OBJECT_LOCK (src);
   gst_buffer_replace (&src->buffer, buffer);
+  gst_buffer_unref (buffer);
   g_free (src->uri);
   src->uri = g_strdup (orig_uri);
   GST_OBJECT_UNLOCK (src);