camerabin: don't leak preview images
authorStefan Kost <ensonic@users.sf.net>
Fri, 26 Jun 2009 15:31:51 +0000 (18:31 +0300)
committerStefan Kost <ensonic@users.sf.net>
Fri, 26 Jun 2009 15:36:25 +0000 (18:36 +0300)
gst/camerabin/gstcamerabin.c

index da5e949ee47c11d0f807fb0901863e673a7340cd..9faefd11cc62ad8f58d40a0006e315e9ed1e11e4 100644 (file)
@@ -1692,6 +1692,7 @@ gst_camerabin_send_preview (GstCameraBin * camera, GstBuffer * buffer)
   if (prev) {
     s = gst_structure_new (PREVIEW_MESSAGE_NAME,
         "buffer", GST_TYPE_BUFFER, prev, NULL);
+    gst_buffer_unref (prev);
 
     msg = gst_message_new_element (GST_OBJECT (camera), s);