[MPlayer-dev-eng] [PATCH] playlists and carriage return issue

Rich Felker dalias at aerifal.cx
Fri Sep 21 08:04:34 CEST 2007


On Fri, Sep 21, 2007 at 12:21:20AM +0200, Gianluigi Tiesi wrote:
> On Thu, Sep 20, 2007 at 04:59:40PM +0200, groente wrote:
> > hey all,
> > 
> > i noticed mplayer getting confused with playlists that have carriage
> > returns instead of newlines. the patch attached to this mail solved the
> > issue for me.
> > 
> > cheers,
> > 
> > groente
> 
> > Index: playtreeparser.c
> > ===================================================================
> > --- playtreeparser.c	(revision 24587)
> > +++ playtreeparser.c	(working copy)
> > @@ -82,6 +82,7 @@
> >      }
> >      
> >      end = strchr(p->iter,'\n');
> > +    if(!end) end = strchr(p->iter,'\r');
> >      if(!end) {
> >        if(p->stream->eof) {
> >  	end = p->buffer + p->buffer_end;
> 
> 
> you need to match \n on unix files
> and \r\n on windows ( anyway not \n\r)

I think you missed the point of this patch. Looking for \r\n is always
useless. Just using them individually works fine.

Rich



More information about the MPlayer-dev-eng mailing list