mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
ref pool before creating buffer that's using it
Original commit message from CVS: ref pool before creating buffer that's using it
This commit is contained in:
parent
8777f9a763
commit
75ec036895
1 changed files with 2 additions and 1 deletions
|
@ -250,12 +250,13 @@ gst_buffer_new_from_pool (GstBufferPool *pool,
|
|||
|
||||
g_return_val_if_fail (pool != NULL, NULL);
|
||||
|
||||
gst_data_ref (GST_DATA (pool));
|
||||
|
||||
buffer = pool->buffer_new (pool, offset, size, pool->user_data);
|
||||
if (!buffer)
|
||||
return NULL;
|
||||
|
||||
GST_BUFFER_BUFFERPOOL (buffer) = pool;
|
||||
gst_data_ref (GST_DATA (pool));
|
||||
|
||||
/* override the buffer refcount functions with those from the pool (if any) */
|
||||
if (pool->buffer_free)
|
||||
|
|
Loading…
Reference in a new issue