summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2015-03-13 18:35:14 +0000
committerThiago Santos <thiagoss@osg.samsung.com>2015-03-13 18:37:04 +0000
commit901fea5985b82fcdf3310fa1d34920d231113613 (patch)
treeef6241f765e3b85d47697eb817cc28b06127e99e
parent96eaeadc0f3cbad3cf35d26f542b8359d27e316d (diff)
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
-rw-r--r--libs/gst/base/gstbasesink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c
index 748d2a256..44f2ab472 100644
--- a/libs/gst/base/gstbasesink.c
+++ b/libs/gst/base/gstbasesink.c
@@ -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);