[grilo] core: initialize caps filter to none.



commit b1e79ceedea7ee4b2d057ac00c28b13aa8056bce
Author: Alban Browaeys <prahal yahoo com>
Date:   Tue Oct 1 18:31:21 2013 +0200

    core: initialize caps filter to none.
    
    Sync with the comment above telling the filter is to be initialized
    to none.
    
    Partially revert commit  5b88159eaa8d06a5f17c092cbb69b79e62d48f2b
    
    The issue is that grl_upnp_source_get_caps set the search and browse
    caps to FILTER_ALL if filtered is supported and do not touch them
    otherwise. But grl_caps_new instantiate a caps with filter initalized to
    FILTER_ALL ... so grl_upnp_source_get_caps always returns caps with
    FILTER_ALL .
    
    Fixes browse vs search for grilo plugin upnp at least against servers
    that has no or incomplete search capabilities.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709208

 src/grl-caps.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/grl-caps.c b/src/grl-caps.c
index dd5ff58..888cfe6 100644
--- a/src/grl-caps.c
+++ b/src/grl-caps.c
@@ -92,7 +92,7 @@ grl_caps_init (GrlCaps *self)
 
   /* by default, type filtering is not considered to be supported. The source
    * has to explicitly modify its caps. */
-  self->priv->type_filter = GRL_TYPE_FILTER_ALL;
+  self->priv->type_filter = GRL_TYPE_FILTER_NONE;
   self->priv->key_filter = NULL;
   self->priv->key_range_filter = NULL;
 }
@@ -178,7 +178,7 @@ grl_caps_test_option (GrlCaps *caps, const gchar *key, const GValue *value)
 GrlTypeFilter
 grl_caps_get_type_filter (GrlCaps *caps)
 {
-  g_return_val_if_fail (caps != NULL, GRL_TYPE_FILTER_ALL);
+  g_return_val_if_fail (caps != NULL, GRL_TYPE_FILTER_NONE);
 
   return caps->priv->type_filter;
 }


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