[MPlayer-dev-eng] [PATCH] , escaping with \, support

Michael Niedermayer michaelni at gmx.at
Mon Oct 16 17:34:52 CEST 2006


Hi

attached patch makes it possible to pass , to filters like
-vf filter1=a\,b:c,filter2

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
-------------- next part --------------
Index: m_option.c
===================================================================
--- m_option.c	(revision 20265)
+++ m_option.c	(working copy)
@@ -1672,7 +1672,14 @@
 
   while(ptr[0] != '\0') {
     last_ptr = ptr;
-    ptr = strchr(ptr,LIST_SEPARATOR);
+    for(;;){
+        ptr = strchr(ptr,LIST_SEPARATOR);
+        if(ptr && ptr>last_ptr && ptr[-1]=='\\'){
+            memmove(ptr-1, ptr, strlen(ptr)+1);
+        }else
+            break;
+    }
+
     if(!ptr) {
       r = parse_obj_settings(name,last_ptr,opt->priv,dst ? &res : NULL,n);
       if(r < 0) {


More information about the MPlayer-dev-eng mailing list