]> git.sesse.net Git - vlc/commitdiff
cli: fix many aout/vout functions
authorPierre Ynard <linkfanel@yahoo.fr>
Thu, 8 Sep 2011 21:50:54 +0000 (23:50 +0200)
committerPierre Ynard <linkfanel@yahoo.fr>
Thu, 8 Sep 2011 21:50:54 +0000 (23:50 +0200)
Get rid of another vlc.object.find() call!

share/lua/intf/cli.lua

index 2663173ef79cddd78daac3635500ed1fb97f9ebf..b8a0b7aea1725bd6f4789d7e4eff2d213573d52d 100644 (file)
@@ -472,7 +472,14 @@ end
 
 function listvalue(obj,var)
     return function(client,value)
-        local o = vlc.object.find(nil,obj,"anywhere")
+        local o
+        if obj == "input" then
+            o = vlc.object.input()
+        elseif obj == "aout" then
+            o = vlc.object.aout()
+        elseif obj == "vout" then
+            o = vlc.object.vout()
+        end
         if not o then return end
         if value then
             vlc.var.set( o, var, value )