From 897371ac4fb75e5d334702341dc641a0e96f26a2 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 14 Aug 2015 18:43:03 +0200 Subject: appsink: unref the preroll buffer and cleanup the segments on stop() Just for consistency. No need to keep data around. --- gst-libs/gst/app/gstappsink.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst-libs/gst/app/gstappsink.c b/gst-libs/gst/app/gstappsink.c index 4850d69db..358fc8683 100644 --- a/gst-libs/gst/app/gstappsink.c +++ b/gst-libs/gst/app/gstappsink.c @@ -538,8 +538,11 @@ gst_app_sink_stop (GstBaseSink * psink) priv->flushing = TRUE; priv->started = FALSE; gst_app_sink_flush_unlocked (appsink); + gst_buffer_replace (&priv->preroll, NULL); gst_caps_replace (&priv->preroll_caps, NULL); gst_caps_replace (&priv->last_caps, NULL); + gst_segment_init (&priv->preroll_segment, GST_FORMAT_UNDEFINED); + gst_segment_init (&priv->last_segment, GST_FORMAT_UNDEFINED); g_mutex_unlock (&priv->mutex); return TRUE; -- cgit v1.2.3