diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2015-08-14 18:43:03 +0200 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2015-08-14 19:27:07 +0200 |
commit | 897371ac4fb75e5d334702341dc641a0e96f26a2 (patch) | |
tree | c4998163727e17d6011e9a21af1b1a090751093f | |
parent | c3e4d8ca6fe118869506065e46fee5fe6d5bcacc (diff) |
appsink: unref the preroll buffer and cleanup the segments on stop()
Just for consistency. No need to keep data around.
-rw-r--r-- | gst-libs/gst/app/gstappsink.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |