camerabin2: preview: No need for appsink to store the last buffer
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>
Tue, 6 Sep 2011 13:49:04 +0000 (10:49 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Wed, 7 Sep 2011 02:03:40 +0000 (23:03 -0300)
There is no need for preview's appsink to keep a reference to the last buffer,
so disable the property to make it unref the buffers sooner.

gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c

index b916d7f..5dd82da 100644 (file)
@@ -146,7 +146,8 @@ gst_camerabin_create_preview_pipeline (GstElement * element,
   }
 
   g_object_set (data->appsrc, "emit-signals", FALSE, NULL);
-  g_object_set (data->appsink, "sync", FALSE, NULL);
+  g_object_set (data->appsink, "sync", FALSE, "enable-last-buffer",
+      FALSE, NULL);
 
   gst_bin_add_many (GST_BIN (data->pipeline), data->appsrc, data->capsfilter,
       data->appsink, csp, vscale, NULL);