[Mplayer-cvslog] CVS: main mplayer.c, 1.767, 1.768 playtreeparser.c, 1.29, 1.30

Joey Parrish joey at nicewarrior.org
Fri Sep 10 17:14:44 CEST 2004


On Fri, Sep 10, 2004 at 12:33:52AM +0200, Alexander Strasser wrote:
> On Fri, Aug 13, 2004 at 12:33:24AM +0200, Joey Parrish CVS wrote:
> > CVS change done by Joey Parrish CVS
> > 
> > Update of /cvsroot/mplayer/main
> > In directory mail:/var2/tmp/cvs-serv27781
> > 
> > Modified Files:
> > 	mplayer.c playtreeparser.c 
> > Log Message:
> > windows path seperator fixes
> > mp_basename now looks for \ and / both
> > new playlist parsing:
> >   /path/to/thing is treated as a full path
> >   c:\windows is treated as a full path
> >   \windows is "near-full" and we prepend drive letter
> >   file.avi is relative and we prepend path to playlist
> AFAICT it doesn't realize full path's under unix like systems anymore.
> This leads to some problems as the GUI always uses the add_basepath
> routine resulting in the GUI never being able to play files described
> with full paths.
> 
> I got many complaints (many from users calling the gui through some
> graphical shell) and it didn't work for me either.
> 
> I suggest something like the attached patch. Though i don't know if
> it works for windows, it is only tested under linux. Could you please
> have a look at it. But I think it should be ok for Window$ too. 


> Index: playtreeparser.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/playtreeparser.c,v
> retrieving revision 1.30
> diff -u -r1.30 playtreeparser.c
> --- playtreeparser.c	12 Aug 2004 22:33:21 -0000	1.30
> +++ playtreeparser.c	9 Sep 2004 16:00:24 -0000
> @@ -624,8 +624,8 @@
>  
>    for(i = 0 ; pt->files[i] != NULL ; i++) {
>      fl = strlen(pt->files[i]);
> -    // if we find url:// or X:\ at the beginning, don't mangle it.
> -    if(fl <= 0 || strstr(pt->files[i],"://") || strstr(pt->files[i],":\\") == pt->files[i] + 1)
> +    // if we find a full path, url:// or X:\ at the beginning, don't mangle it.
> +    if(fl <= 0 || strstr(pt->files[i],"://") || (strstr(pt->files[i],":\\") == pt->files[i] + 1) || (pt->files[i][0] == '/') )
>        continue;
>      // if the path begins with \ then prepend drive letter to it.
>      if (pt->files[i][0] == '\\') {

This looks good.  10l to me if it was broken until now.  Please commit.

--Joey

-- 
"I tell you:  one must still have chaos in oneself to give
birth to a dancing star!" --Nietzsche




More information about the MPlayer-cvslog mailing list