[vlc-devel] "file://localhost/" handling in input.c on win32

Michael A. Puls II shadow2531 at gmail.com
Fri Aug 26 13:53:11 CEST 2011


On Thu, 25 Aug 2011 08:28:54 -0400, Rémi Denis-Courmont <remi at remlab.net>  
wrote:

> Just for the sake of clarity, I wrote _I_ was not going to fix the
> problem. I did _not_ write that no one was allowed to fix it.

I think the issue might be with  
<http://git.videolan.org/?p=vlc.git;a=blob;f=src/text/strings.c;h=0666cfd9b6948609f7354117edd3ac1e2357ac39;hb=HEAD#l1223>

For file://localhost/c:/test.mp3 on win32, 'path' at this stage will be  
localhost\c:\dir\test.mp3.

Then, after:

return memmove (path, path + 9, strlen (path + 9) + 1);

, it'll be \c:\dir\test.mp3

, which isn't right. The \ at the beginning shouldn't be there (at least  
for win32).

return memmove (path, path + 10, strlen (path + 9) + 1);
or
return memmove (path, path + 9, strlen (path + 9) + 1) + 1;

should produce the desired result I think.

Was able to compile vlc, but vlc freezes when opening files just like it  
does for the latest nightlies. Will wait till it's better and test the  
fix. If max needs that beginning \, I'll ifdef win32 version of that line.

-- 
Michael



More information about the vlc-devel mailing list