[MPlayer-users] Two bugs in drag and drop to mplayer
Stephen Watson
stephen at kerofin.demon.co.uk
Wed Nov 30 19:31:43 CET 2005
I've found 2 bugs in mplayer's drag and drop handling.
The first bug is when mplayer processes the passed urls it counts how many
valid ones it finds, then subtracts 1 for no reason. The result is that if
you drag N files, it plays N-1. If you drag 1 it plays none.
The second bug is that it only inteprets file:///path urls, not the full
file://hostname/path syntax.
This patch (against CVS) fixes both
Index: Gui/wm/wsxdnd.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/wsxdnd.c,v
retrieving revision 1.7
diff -c -u -r1.7 wsxdnd.c
--- Gui/wm/wsxdnd.c 15 Dec 2004 01:22:24 -0000 1.7
+++ Gui/wm/wsxdnd.c 30 Nov 2005 18:13:45 -0000
@@ -98,6 +98,13 @@
/* add more 2 chars while removing 5 is harmless */
retain+=5;
}
+ if(strncmp(retain, "//", 2)==0) {
+ retain+=2;
+ /* Does it contain a hostname part? */
+ /* TODO: check the hostname is local... */
+ while(*retain && *retain!='/' && *retain!='\r' && *retain!='\n')
+ retain++;
+ }
/* add the "retain" to the list */
files[num++]=retain;
@@ -124,7 +131,7 @@
/* Handle the files */
if(wnd->DandDHandler){
- wnd->DandDHandler(num-1,files);
+ wnd->DandDHandler(num,files);
}
}
--
Stephen Watson http://www.kerofin.demon.co.uk/
If you read this on a mailing list, send any reply back to the list and not
to me. Not even CC.
That's wierd, new teeth!
More information about the MPlayer-users
mailing list