summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--examples/app/appsink-src.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c70971fe..68624484 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-19 Wim Taymans <wim.taymans@collabora.co.uk>
+
+ * examples/app/appsink-src.c: (on_new_buffer_from_source):
+ Don't use a buffer after unreffing it.
+
2008-06-18 Stefan Kost <ensonic@users.sf.net>
* ext/metadata/metadataexif.c:
diff --git a/examples/app/appsink-src.c b/examples/app/appsink-src.c
index 6472af30..a92dfb51 100644
--- a/examples/app/appsink-src.c
+++ b/examples/app/appsink-src.c
@@ -38,12 +38,14 @@ on_new_buffer_from_source (GstElement * elt, ProgramData * data)
memcpy (raw_buffer, GST_BUFFER_DATA (buffer), size);
app_buffer = gst_app_buffer_new (raw_buffer, size, g_free, raw_buffer);
- /* we don't need the appsink buffer anymore */
- gst_buffer_unref (buffer);
-
/* newer basesrc will set caps for use automatically but it does not really
* hurt to set it on the buffer again */
gst_buffer_set_caps (app_buffer, GST_BUFFER_CAPS (buffer));
+
+ /* we don't need the appsink buffer anymore */
+ gst_buffer_unref (buffer);
+
+ /* get source an push new buffer */
source = gst_bin_get_by_name (GST_BIN (data->sink), "testsource");
gst_app_src_push_buffer (GST_APP_SRC (source), app_buffer);
}