mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
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
1 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue