[clutter-gst/clutter-gst-3.0] auto-video-sink: Don't leak kid on dispose



commit 733ca7effb3c01bb5e9d1b9d4efc1cce5b38a975
Author: Nicolas Dufresne <nicolas dufresne collabora com>
Date:   Mon Dec 7 17:20:20 2015 -0500

    auto-video-sink: Don't leak kid on dispose
    
    Currently we leak the kid by not removing it from the
    content. Remove the kid sink from the content when removing
    it from the pipeline.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759205

 clutter-gst/clutter-gst-auto-video-sink.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/clutter-gst/clutter-gst-auto-video-sink.c b/clutter-gst/clutter-gst-auto-video-sink.c
old mode 100644
new mode 100755
index 792a832..5c22f3f
--- a/clutter-gst/clutter-gst-auto-video-sink.c
+++ b/clutter-gst/clutter-gst-auto-video-sink.c
@@ -145,6 +145,11 @@ clutter_gst_auto_video_sink_clear_kid (ClutterGstAutoVideoSink3 *sink)
       /* Don't lose the SINK flag */
       GST_OBJECT_FLAG_SET (sink, GST_ELEMENT_FLAG_SINK);
     }
+
+  if (sink->content)
+    {
+      clutter_gst_content_set_sink (CLUTTER_GST_CONTENT (sink->content), NULL);
+    }
 }
 
 /*


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]