diff options
author | Jacques de Broin <jdebroin@yahoo.ca> | 2018-06-01 19:04:48 -0400 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2018-06-06 00:33:19 +0300 |
commit | 7aea060a60ccd5e9f3a82021351d594a27441462 (patch) | |
tree | 4eb800fd0c1cab0ee0a41895c3e48f673ee342c4 | |
parent | c25c2967602bce6d980303202b16b66068931665 (diff) |
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
-rw-r--r-- | markdown/tutorials/basic/short-cutting-the-pipeline.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/markdown/tutorials/basic/short-cutting-the-pipeline.md b/markdown/tutorials/basic/short-cutting-the-pipeline.md index c07ea1d..736fae3 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; } ``` |