[vlc-devel] commit: Fixed module_need in case a shortcut list was provided. ( Laurent Aimar )

git version control git at videolan.org
Fri May 1 14:17:28 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri May  1 14:14:17 2009 +0200| [5226ae13208f5880054acc5d3125b9a56ea165bd] | committer: Laurent Aimar 

Fixed module_need in case a shortcut list was provided.

 Always reject plugins that have a 0 priority but did not match the
shortcut list (being empty or not).
This makes 0 priority plugin only selectable using a shortcut (which I
think it is what we want).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5226ae13208f5880054acc5d3125b9a56ea165bd
---

 src/modules/modules.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/modules/modules.c b/src/modules/modules.c
index 8b09787..e213234 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -534,11 +534,10 @@ module_t * __module_need( vlc_object_t *p_this, const char *psz_capability,
             if( b_strict )
                 continue;
         }
-        /* If we didn't require a shortcut, trash <= 0 scored plugins */
-        else if( p_module->i_score <= 0 )
-        {
+
+        /* Trash <= 0 scored plugins (they can only be selected by shortcut) */
+        if( p_module->i_score <= 0 )
             continue;
-        }
 
 found_shortcut:
         /* Store this new module */




More information about the vlc-devel mailing list