]> git.sesse.net Git - vlc/commitdiff
vlm: don't remove quotes around name in
authorRémi Duraffort <ivoire@videolan.org>
Sun, 14 Dec 2008 17:58:41 +0000 (18:58 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Sun, 14 Dec 2008 18:00:35 +0000 (19:00 +0100)
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

src/input/vlmshell.c

index 83a5639e7e7d8b6f85a50d9904edfd375c547356..b55e632e9bd06c9b88a828b72b0d47781be81a57 100644 (file)
@@ -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