[totem] Sink the floating reference on the visualisation element



commit b64fae7552e3eea913d5f9ab1beb0cba79416e28
Author: Jan Schmidt <thaytan noraisin net>
Date:   Tue Jul 14 16:08:13 2009 +0100

    Sink the floating reference on the visualisation element
    
    2009-07-14  Jan Schmidt  <thaytan noraisin net>
            * src/backend/bacon-video-widget-gst-0.10.c (setup_vis):
            Sink the floating reference on the visualisation element
            before giving it to playbin2, so that we can make sure we own
            the ref regardless of what playbin2 does internally. playbin2
            currently sinks the element itself, but may change.

 ChangeLog                                 |    8 ++++++++
 src/backend/bacon-video-widget-gst-0.10.c |    3 +++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f26050d..3b33c5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-07-14  Jan Schmidt  <thaytan noraisin net>
+
+	* src/backend/bacon-video-widget-gst-0.10.c (setup_vis):
+	Sink the floating reference on the visualisation element
+	before giving it to playbin2, so that we can make sure we own
+	the ref regardless of what playbin2 does internally. playbin2
+	currently sinks the element itself, but may change.
+
 2009-07-08  Sebastian Dröge  <sebastian droege collabora co uk>
 
 	* src/backend/bacon-video-widget-gst-0.10.c:
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index a8902c5..583408e 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -4039,6 +4039,9 @@ setup_vis (BaconVideoWidget * bvw)
       gst_object_unref (vis_capsfilter);
       goto beach;
     }
+    /* We created the bin, now ref and sink to make sure we own it */
+    gst_object_ref (vis_bin);
+    gst_object_sink (vis_bin);
     
     gst_bin_add_many (GST_BIN (vis_bin), vis_element, vis_capsfilter, NULL);
     



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