gst/playback/gstplaybin.c: Only remove visualisation from visbin if there is a visbin...
authorTim-Philipp Müller <tim@centricular.net>
Thu, 28 Sep 2006 09:41:20 +0000 (09:41 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Thu, 28 Sep 2006 09:41:20 +0000 (09:41 +0000)
Original commit message from CVS:
* gst/playback/gstplaybin.c: (remove_sinks):
Only remove visualisation from visbin if there is a visbin (or:
don't throw warnings when closing totem without playing a file).

ChangeLog
gst/playback/gstplaybin.c

index 9284616..eaab27f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-28  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * gst/playback/gstplaybin.c: (remove_sinks):
+         Only remove visualisation from visbin if there is a visbin (or:
+         don't throw warnings when closing totem without playing a file).
+
 2006-09-27  Wim Taymans  <wim@fluendo.com>
 
        * gst-libs/gst/audio/gstbaseaudiosink.c:
index d03a4e4..027448a 100644 (file)
@@ -1311,9 +1311,11 @@ remove_sinks (GstPlayBin * play_bin)
         GST_ELEMENT_CAST (gst_element_get_parent (play_bin->visualisation));
 
     gst_element_set_state (play_bin->visualisation, GST_STATE_NULL);
-    gst_bin_remove (GST_BIN_CAST (vis_bin), play_bin->visualisation);
 
-    gst_object_unref (vis_bin);
+    if (vis_bin) {
+      gst_bin_remove (GST_BIN_CAST (vis_bin), play_bin->visualisation);
+      gst_object_unref (vis_bin);
+    }
   }
 
   if (play_bin->frame) {