[clutter-gst/clutter-gst-3.0] video-sink: Cleanup on _stop rather then late dispose
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter-gst/clutter-gst-3.0] video-sink: Cleanup on _stop rather then late dispose
- Date: Thu, 10 Dec 2015 14:40:32 +0000 (UTC)
commit ba7d2b9158cd2b244628c6f5e0f2f43472a08d1b
Author: Nicolas Dufresne <nicolas dufresne collabora com>
Date: Mon Dec 7 17:28:05 2015 -0500
video-sink: Cleanup on _stop rather then late dispose
We need to cleanup all our run-time resources when we go back to
ready state. Otherwise we endup holding buffers in the renderers.
https://bugzilla.gnome.org/show_bug.cgi?id=759207
clutter-gst/clutter-gst-video-sink.c | 33 +++++++++++++++++----------------
1 files changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
index 673630f..9995e4f 100644
--- a/clutter-gst/clutter-gst-video-sink.c
+++ b/clutter-gst/clutter-gst-video-sink.c
@@ -2185,19 +2185,6 @@ clutter_gst_video_sink_dispose (GObject *object)
self = CLUTTER_GST_VIDEO_SINK (object);
priv = self->priv;
- clear_frame_textures (self);
-
- if (priv->renderer) {
- priv->renderer->shutdown (self);
- priv->renderer = NULL;
- }
-
- if (priv->clt_frame)
- {
- g_boxed_free (CLUTTER_GST_TYPE_FRAME, priv->clt_frame);
- priv->clt_frame = NULL;
- }
-
if (priv->caps)
{
gst_caps_unref (priv->caps);
@@ -2248,10 +2235,10 @@ clutter_gst_video_sink_start (GstBaseSink *base_sink)
static gboolean
clutter_gst_video_sink_stop (GstBaseSink *base_sink)
{
- ClutterGstVideoSink *sink = CLUTTER_GST_VIDEO_SINK (base_sink);
- ClutterGstVideoSinkPrivate *priv = sink->priv;
+ ClutterGstVideoSink *self = CLUTTER_GST_VIDEO_SINK (base_sink);
+ ClutterGstVideoSinkPrivate *priv = self->priv;
- GST_INFO_OBJECT (sink, "Stop");
+ GST_INFO_OBJECT (self, "Stop");
if (priv->source)
{
@@ -2261,6 +2248,20 @@ clutter_gst_video_sink_stop (GstBaseSink *base_sink)
priv->source = NULL;
}
+ clear_frame_textures (self);
+
+ if (priv->renderer)
+ {
+ priv->renderer->shutdown (self);
+ priv->renderer = NULL;
+ }
+
+ if (priv->clt_frame)
+ {
+ g_boxed_free (CLUTTER_GST_TYPE_FRAME, priv->clt_frame);
+ priv->clt_frame = NULL;
+ }
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]