gnome-media r4040 - trunk/gstreamer-properties



Author: kmaraas
Date: Sat Nov  8 11:39:01 2008
New Revision: 4040
URL: http://svn.gnome.org/viewvc/gnome-media?rev=4040&view=rev

Log:
2008-09-18  Kjartan Maraas  <kmaraas gnome org>

	* gstreamer-properties.c: (create_dialog), (main):
	* pipeline-tests.c: (gst_pipeline_string_get_property_value):
	Make a function static and stop leaking GnomeProgram. Bug #552748.

Modified:
   trunk/gstreamer-properties/ChangeLog
   trunk/gstreamer-properties/gstreamer-properties.c
   trunk/gstreamer-properties/pipeline-tests.c

Modified: trunk/gstreamer-properties/gstreamer-properties.c
==============================================================================
--- trunk/gstreamer-properties/gstreamer-properties.c	(original)
+++ trunk/gstreamer-properties/gstreamer-properties.c	Sat Nov  8 11:39:01 2008
@@ -587,11 +587,10 @@
   }
 }
 
-void
+static void
 create_dialog (void)
 {
   int i = 0;
-  GdkPixbuf *icon = NULL;
 
   for (i = 0; i < pipeline_editors_count; i++) {
     init_pipeline_editor (interface_xml, pipeline_editors + i);
@@ -615,7 +614,7 @@
 main (int argc, char **argv)
 {
   GOptionContext *ctx;
-  GOptionGroup *group;
+  GnomeProgram *program;
 
   g_thread_init (NULL);
 
@@ -626,7 +625,7 @@
   ctx = g_option_context_new ("gstreamer-properties");
   g_option_context_add_group (ctx, gst_init_get_option_group ());
 
-  gnome_program_init ("gstreamer-properties", VERSION,
+  program = gnome_program_init ("gstreamer-properties", VERSION,
       LIBGNOMEUI_MODULE, argc, argv,
       GNOME_PARAM_GOPTION_CONTEXT, ctx,
       GNOME_PARAM_APP_DATADIR, DATADIR, NULL);
@@ -654,6 +653,7 @@
 
     gtk_dialog_run (GTK_DIALOG (dialog));
     gtk_widget_destroy (dialog);
+    g_object_unref (program);
 
     exit (1);
   }
@@ -664,6 +664,7 @@
     gtk_main ();
 
   g_object_unref (gconf_client);
+  g_object_unref (program);
 
   return 0;
 }

Modified: trunk/gstreamer-properties/pipeline-tests.c
==============================================================================
--- trunk/gstreamer-properties/pipeline-tests.c	(original)
+++ trunk/gstreamer-properties/pipeline-tests.c	Sat Nov  8 11:39:01 2008
@@ -86,7 +86,7 @@
 
   pipeline_nodes = g_strsplit (pipeline_str, " ", -1);
 
-  while(node = pipeline_nodes[i++]) {
+  while ((node = pipeline_nodes[i++])) {
     /* Split into key = value pair */
     node_split = g_strsplit_set (node, "=", -1);
     if (node_split != NULL && node_split[1] != NULL) {



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