mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
examples/app/appsink-src.c: Don't use a buffer after unreffing it.
Original commit message from CVS: * examples/app/appsink-src.c: (on_new_buffer_from_source): Don't use a buffer after unreffing it.
This commit is contained in:
parent
7960b82a40
commit
1de45598a7
2 changed files with 10 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue