[MPlayer-dev-eng] parser-mpcmd.c - couple of -loop bugs, one fixed

D Richard Felker III dalias at aerifal.cx
Tue Jan 14 18:26:24 CET 2003


On Tue, Jan 14, 2003 at 02:13:20PM +0000, Alex Sisson wrote:
>  --- Arpi <arpi at thot.banki.hu> wrote: > Hi,
> > 
> > > Noticed a few bugs with the -loop option...
> > > One is on line 219  if(!end) should be if(*end)
> > ...
> > > I'll make a patch if you like, but its only one
> > > character difference!
> > 
> > which file, version?
> parser-mpcmd.c, latest cvs version (1.6)
> 
> > 
> > > Secondly, if -loop is passed as a first arg, eg:
> > >   $ mplayer -loop 1 foo.avi
> > > 
> > > it will play it once, but if its passed after the
> > > file, eg:
> > > 
> > >   $ mplayer foo.avi -loop 1
> > > 
> > > it plays it twice. Was gonna try and fix it, but
> > -loop
> > > seems to parsed it different places depending on
> > where
> > > it is on the cmdline, and I haven't figured it out
> > > yet.
> > 
> > yep. the options before the first filename are
> > global opts,
> > and are parsed (and -loop executed) by the playtree
> > code.
> > the options after filenames are per-file options,
> > -loop there
> > is processed by mplayer.c (by seeking back to pos
> > 0).
> > 
> > you can notice that mplayer -loop 0 file will
> > flicker (re-init
> > videoout, audioout etc after each loop) while
> > mplayer file -loop 0 won't
> > 
> > the first case loops the playlist, the later the
> > single file
> > 
> 
> ok, thanks, i'll go and have a look...
> also I was thinking about allowing -loop to have no
> options to mean inifinite.

What then if I have a movie file named "1"? mplayer -loop 1? IMHO
supporting optional arguments like this is nonsense.

Rich



More information about the MPlayer-dev-eng mailing list