vlc | branch: master | Pierre Ynard <[email protected]> | Sun Oct 16 18:11:31 
2011 +0200| [51d532665726863204efb42d8f7ad66448fc8994] | committer: Pierre Ynard

cli.lua: skip unknown VLM commands

Fixes #5396

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

 share/lua/intf/cli.lua |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/share/lua/intf/cli.lua b/share/lua/intf/cli.lua
index b8a0b7a..c2259a2 100644
--- a/share/lua/intf/cli.lua
+++ b/share/lua/intf/cli.lua
@@ -658,8 +658,13 @@ function call_vlm_command(cmd,client,arg)
         cmd = cmd.." "..arg
     end
     local message, vlc_err = vlm:execute_command( cmd )
+    -- the VLM doesn't let us know if the command exists,
+    -- so we need this ugly hack
+    if vlc_err ~= 0 and message.value == "Unknown VLM command" then
+        return vlc_err
+    end
     vlm_message_to_string( client, message )
-    return vlc_err
+    return 0
 end
 
 function call_libvlc_command(cmd,client,arg)

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to