mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
actually use the free_data function
Original commit message from CVS: actually use the free_data function
This commit is contained in:
parent
ea1135ec9f
commit
15f42f6aeb
1 changed files with 4 additions and 1 deletions
|
@ -91,8 +91,11 @@ gst_buffer_default_free (GstBuffer *buffer)
|
|||
g_return_if_fail (buffer != NULL);
|
||||
|
||||
/* free our data */
|
||||
if (!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_DONTFREE) && GST_BUFFER_DATA (buffer))
|
||||
if (GST_BUFFER_FREE_DATA_FUNC (buffer)) {
|
||||
GST_BUFFER_FREE_DATA_FUNC (buffer) (buffer);
|
||||
} else if (!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_DONTFREE)) {
|
||||
g_free (GST_BUFFER_DATA (buffer));
|
||||
}
|
||||
|
||||
/* set to safe values */
|
||||
GST_BUFFER_DATA (buffer) = NULL;
|
||||
|
|
Loading…
Reference in a new issue