[totem] backend: Fix debug output producing warnings



commit 936048534600d901a59c5e3ba4d747fa13988bf6
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Apr 6 17:50:27 2011 +0100

    backend: Fix debug output producing warnings
    
    If we don't already have the BvwMetadataType enum class ref'ed,
    we can't use it to print out the metadata type. So ref it on _init()
    and unref on _finalize().

 src/backend/bacon-video-widget-gst-0.10.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index 24bab94..deb35da 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -1125,6 +1125,8 @@ bacon_video_widget_init (BaconVideoWidget * bvw)
 
   gtk_widget_set_can_focus (GTK_WIDGET (bvw), TRUE);
 
+  g_type_class_ref (BVW_TYPE_METADATA_TYPE);
+
   bvw->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (bvw, BACON_TYPE_VIDEO_WIDGET, BaconVideoWidgetPrivate);
 
   priv->update_id = 0;
@@ -2394,6 +2396,8 @@ bacon_video_widget_finalize (GObject * object)
 
   GST_DEBUG ("finalizing");
 
+  g_type_class_unref (g_type_class_peek (BVW_TYPE_METADATA_TYPE));
+
   if (bvw->priv->bus) {
     /* make bus drop all messages to make sure none of our callbacks is ever
      * called again (main loop might be run again to display error dialog) */



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