[totem/gnome-3-6] grilo: Fix resolve() crashing
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-3-6] grilo: Fix resolve() crashing
- Date: Thu, 25 Oct 2012 08:53:56 +0000 (UTC)
commit 411aea54962e1eb5f51367a39b1e94125e441578
Author: Marco Piazza <mpiazza gmail com>
Date: Fri Oct 12 16:14:54 2012 +0200
grilo: Fix resolve() crashing
We cannot pass NULL options to grl_source_resolve()
https://bugzilla.gnome.org/show_bug.cgi?id=686003
src/plugins/grilo/totem-grilo.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/grilo/totem-grilo.c b/src/plugins/grilo/totem-grilo.c
index 753a98b..4b64994 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -70,6 +70,7 @@
"</ui>"
#define BROWSE_FLAGS (GRL_RESOLVE_FAST_ONLY | GRL_RESOLVE_IDLE_RELAY)
+#define RESOLVE_FLAGS (GRL_RESOLVE_FULL | GRL_RESOLVE_IDLE_RELAY)
#define PAGE_SIZE 50
#define THUMB_SEARCH_SIZE 256
#define THUMB_BROWSE_SIZE 32
@@ -573,11 +574,20 @@ play (TotemGriloPlugin *self,
if (resolve_url &&
grl_source_supported_operations (source) & GRL_OP_RESOLVE) {
const GList *slow_keys;
- GList *url_keys;
+
slow_keys = grl_source_slow_keys (source);
+
if (g_list_find ((GList *) slow_keys, GINT_TO_POINTER (GRL_METADATA_KEY_URL)) != NULL) {
+ GList *url_keys;
+ GrlOperationOptions *resolve_options;
+
+ resolve_options = grl_operation_options_new (NULL);
+ grl_operation_options_set_flags (resolve_options, RESOLVE_FLAGS);
+
url_keys = grl_metadata_key_list_new (GRL_METADATA_KEY_URL, NULL);
- grl_source_resolve (source, media, url_keys, 0, resolve_url_cb, self);
+ grl_source_resolve (source, media, url_keys, resolve_options, resolve_url_cb, self);
+
+ g_object_unref (resolve_options);
g_list_free (url_keys);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]