mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-02 12:45:51 +00:00
basesink: need to deep-copy last buffer list in drain
https://bugzilla.gnome.org/show_bug.cgi?id=751420
This commit is contained in:
parent
d78b9a5ada
commit
85aad81647
|
@ -4900,13 +4900,20 @@ static void
|
||||||
gst_base_sink_drain (GstBaseSink * basesink)
|
gst_base_sink_drain (GstBaseSink * basesink)
|
||||||
{
|
{
|
||||||
GstBuffer *old;
|
GstBuffer *old;
|
||||||
|
GstBufferList *old_list;
|
||||||
|
|
||||||
GST_OBJECT_LOCK (basesink);
|
GST_OBJECT_LOCK (basesink);
|
||||||
if ((old = basesink->priv->last_buffer))
|
if ((old = basesink->priv->last_buffer))
|
||||||
basesink->priv->last_buffer = gst_buffer_copy_deep (old);
|
basesink->priv->last_buffer = gst_buffer_copy_deep (old);
|
||||||
|
|
||||||
|
if ((old_list = basesink->priv->last_buffer_list))
|
||||||
|
basesink->priv->last_buffer_list = gst_buffer_list_copy_deep (old_list);
|
||||||
GST_OBJECT_UNLOCK (basesink);
|
GST_OBJECT_UNLOCK (basesink);
|
||||||
|
|
||||||
if (old)
|
if (old)
|
||||||
gst_buffer_unref (old);
|
gst_buffer_unref (old);
|
||||||
|
if (old_list)
|
||||||
|
gst_mini_object_unref (GST_MINI_OBJECT_CAST (old_list));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue