mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
basesink: when draining, deep copy the last buffer to unref old memory
Use gst_buffer_copy_deep() to force the copy of the underlying memory instead of possibly doing a shallow copy of the buffer and just referencing the memory https://bugzilla.gnome.org/show_bug.cgi?id=745287
This commit is contained in:
parent
96eaeadc0f
commit
901fea5985
1 changed files with 1 additions and 1 deletions
|
@ -4857,7 +4857,7 @@ gst_base_sink_default_query (GstBaseSink * basesink, GstQuery * query)
|
|||
|
||||
GST_OBJECT_LOCK (basesink);
|
||||
if ((old = basesink->priv->last_buffer))
|
||||
basesink->priv->last_buffer = gst_buffer_copy (old);
|
||||
basesink->priv->last_buffer = gst_buffer_copy_deep (old);
|
||||
GST_OBJECT_UNLOCK (basesink);
|
||||
if (old)
|
||||
gst_buffer_unref (old);
|
||||
|
|
Loading…
Reference in a new issue