[vlc-devel] Possible vlm bug

VLVC Team devel at vlvc.net
Mon Nov 27 11:38:36 CET 2006


Hi,
We needed to specify a video capture device name containing spaces,
using vlm, for example "Logitech QuickCam Express".
But it doesn't work because once parsed by vlm the device name was
only "Logitech".
We tested it on both DirectShow and V4L.

Having a deep look in the vlm source code (src/misc/vlm.c) we maybe
found the problem in function: FindEndCommand.
We think b_escape should be used to test the space case as well.

Here is a diff of the changes we made to make It work for us.

--- src/misc/vlm.c (original)
+++ src/misc/vlm.c (modified)
@@ -319,7 +319,7 @@
         break;

     default: /* now we can look for spaces */
-        while( ( *psz_sent != ' ' ) && ( *psz_sent != '\0' ) )
+        while( ( *psz_sent != ' ' || b_escape == VLC_TRUE ) && (
*psz_sent != '\0' ) )
         {
             if( ( ( *psz_sent == '\'' ) || ( *psz_sent == '\"' ) )
                 && b_escape == VLC_FALSE )

As you can see we added another condition (|| b_escape == VLC_TRUE) to
ignore backlashed spaces.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list