From 01eab3cad51f9286701d8148e9875bd7467a6b82 Mon Sep 17 00:00:00 2001 Message-Id: <01eab3cad51f9286701d8148e9875bd7467a6b82.1714806349.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sun, 26 Nov 2017 20:30:00 +0000 Subject: [PATCH 1/1] server/gstdecode.c: Limit the buildup of internal buffers. Organization: Straylight/Edgeware From: Mark Wooding Block upstream decoding if we start to build up too many buffers (presumably because downstream is waiting for real time to pass while it plays audio at us). The magic number 16 is plucked from nowhere in particular. I have no idea how to choose a number properly. --- server/gstdecode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/gstdecode.c b/server/gstdecode.c index 93cde85..a746a24 100644 --- a/server/gstdecode.c +++ b/server/gstdecode.c @@ -366,6 +366,8 @@ static void decode(void) g_signal_connect(bus, "message", G_CALLBACK(bus_message), 0); /* Tell the sink to call us when interesting things happen. */ + gst_app_sink_set_max_buffers(appsink, 16); + gst_app_sink_set_drop(appsink, FALSE); gst_app_sink_set_callbacks(appsink, &callbacks, 0, 0); /* Set the ball rolling. */ -- [mdw]