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
This commit is contained in:
parent
c25c296760
commit
7aea060a60
@ -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;
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user