From 7aea060a60ccd5e9f3a82021351d594a27441462 Mon Sep 17 00:00:00 2001 From: Jacques de Broin Date: Fri, 1 Jun 2018 19:04:48 -0400 Subject: [PATCH] gst-docs: add return value to appsink callback in tutorial The "crude waveform generator" sample application in "Basic tutorial 8: Short-cutting the pipeline" was lacking the return value so it was only being invoked once. https://bugzilla.gnome.org/show_bug.cgi?id=796476 --- markdown/tutorials/basic/short-cutting-the-pipeline.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/markdown/tutorials/basic/short-cutting-the-pipeline.md b/markdown/tutorials/basic/short-cutting-the-pipeline.md index c07ea1d65d..736fae37c3 100644 --- a/markdown/tutorials/basic/short-cutting-the-pipeline.md +++ b/markdown/tutorials/basic/short-cutting-the-pipeline.md @@ -499,7 +499,7 @@ Once we have the buffer ready, we pass it to `appsrc` with the ``` c /* The appsink has received a buffer */ -static void new_sample (GstElement *sink, CustomData *data) { +static GstFlowReturn new_sample (GstElement *sink, CustomData *data) { GstSample *sample; /* Retrieve the buffer */ g_signal_emit_by_name (sink, "pull-sample", &sample); @@ -507,7 +507,9 @@ static void new_sample (GstElement *sink, CustomData *data) { /* The only thing we do in this example is print a * to indicate a received buffer */ g_print ("*"); gst_sample_unref (sample); + return GST_FLOW_OK; } + return GST_FLOW_ERROR; } ```