[vlc-devel] commit: vlm: don't remove quotes around name in ( Rémi Duraffort )

git version control git at videolan.org
Sun Dec 14 19:01:03 CET 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Dec 14 18:58:41 2008 +0100| [a3a59eb0f7261e5b888c19fbe038619005b66411] | committer: Rémi Duraffort 

vlm: don't remove quotes around name in
setup test output #standard{mux=ts,access=udp,dst=239.255.100.42,sap,name="Pouet Pouet"}
That's maybe not the best way to do this.
Fix #2346

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

 src/input/vlmshell.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/input/vlmshell.c b/src/input/vlmshell.c
index 83a5639..b55e632 100644
--- a/src/input/vlmshell.c
+++ b/src/input/vlmshell.c
@@ -138,9 +138,20 @@ static const char *FindCommandEnd( const char *psz_sent )
 static int Unescape( char *out, const char *in )
 {
     char c, quote = 0;
+    bool param = false;
 
     while( (c = *in++) != '\0' )
     {
+        // Don't escape the end of the string if we find a '#'
+        // that's the begining of a vlc command
+        // TODO: find a better solution
+        if( c == '#' || param )
+        {
+            param = true;
+            *out++ = c;
+            continue;
+        }
+
         if( !quote )
         {
             if (strchr(quotes,c))   // opening quote




More information about the vlc-devel mailing list