[grilo-plugins] optical-media: Don't pass browse data to entry_parsed_cb()



commit 762fd61271a982e792e5de718bb2de39cda07923
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Jan 20 19:09:54 2014 +0100

    optical-media: Don't pass browse data to entry_parsed_cb()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722629

 src/optical-media/grl-optical-media.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/optical-media/grl-optical-media.c b/src/optical-media/grl-optical-media.c
index 97590a4..5f24f3c 100644
--- a/src/optical-media/grl-optical-media.c
+++ b/src/optical-media/grl-optical-media.c
@@ -415,25 +415,25 @@ parsed_finished (TotemPlParser *pl, GAsyncResult *result, BrowseData *data)
 }
 
 static void
-entry_parsed_cb (TotemPlParser *parser,
-                 const char    *uri,
-                 GHashTable    *metadata,
-                 BrowseData    *data)
+entry_parsed_cb (TotemPlParser  *parser,
+                 const char     *uri,
+                 GHashTable     *metadata,
+                 GrlMedia      **media)
 {
   char *scheme;
 
-  g_return_if_fail (data->media != NULL);
-  if (grl_media_get_url (data->media) != NULL) {
+  g_return_if_fail (*media != NULL);
+  if (grl_media_get_url (*media) != NULL) {
     GRL_WARNING ("Was going to set media '%s' to URL '%s' but already has URL '%s'",
-                 grl_media_get_id (data->media),
+                 grl_media_get_id (*media),
                  uri,
-                 grl_media_get_url (data->media));
+                 grl_media_get_url (*media));
     return;
   }
 
   scheme = g_uri_parse_scheme (uri);
   if (scheme != NULL && !g_str_equal (scheme, "file"))
-    grl_media_set_url (data->media, uri);
+    grl_media_set_url (*media, uri);
   g_free (scheme);
 }
 
@@ -545,7 +545,7 @@ grl_optical_media_source_browse (GrlSource *source,
   data->parser = totem_pl_parser_new ();
   g_object_set (data->parser, "recurse", FALSE, NULL);
   g_signal_connect (G_OBJECT (data->parser), "entry-parsed",
-                    G_CALLBACK (entry_parsed_cb), data);
+                    G_CALLBACK (entry_parsed_cb), &data->media);
 
   resolve_disc_urls (data);
 }


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