From 323cc9b1479ee8ef7351eb300506f5ddd8a8f2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Rodr=C3=ADguez?= Date: Mon, 25 May 2020 10:29:03 +0200 Subject: [PATCH] Limiting the number of frames that are stored in appsink buffer --- src/gscam.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gscam.cpp b/src/gscam.cpp index d0c6cc9..d3ca863 100644 --- a/src/gscam.cpp +++ b/src/gscam.cpp @@ -128,6 +128,7 @@ namespace gscam { // Create RGB sink sink_ = gst_element_factory_make("appsink",NULL); GstCaps * caps = gst_app_sink_get_caps(GST_APP_SINK(sink_)); + gst_app_sink_set_max_buffers(GST_APP_SINK(sink_), 1); #if (GST_VERSION_MAJOR == 1) // http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/section-types-definitions.html