[vlc-devel] fix for ticket 3154

Marnik Vander Elst marnik at marnik.org
Mon Mar 1 15:08:22 CET 2010


The ticket http://trac.videolan.org/vlc/ticket/3154 states that DirectShow
devices containing the # character cannot be used in VLM configs. When using
2 identical webcams, this is exactly what happens.

I think the problem is on line 137 of src/input/vlmshell.c (
http://trac.videolan.org/vlc/browser/src/input/vlmshell.c)

134 // Don't escape the end of the string if we find a '#'
135 // that's the begining of a vlc command
136 // TODO: find a better solution
137 if( c == '#' || param )
138 {
139   param = true;
140   *out++ = c;
141   continue;
142 }

Finding charatcter # does not always mean a VLC command is following.
Replacing line 137 with

if( ( c == '#' && !quote ) || param )

should to the trick, it won't consider # inside quotes as the beginning of a
VLC command. However, I don't know if this could break other stuff, I'm too
unfamiiar with the code.

Regards,

Marnik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100301/a4f5de4c/attachment.html>


More information about the vlc-devel mailing list