[MPlayer-cvslog] CVS: main subreader.c,1.144,1.145

Rich Felker dalias at aerifal.cx
Sat Oct 8 23:40:59 CEST 2005


On Sat, Oct 08, 2005 at 10:56:40PM +0200, Ivan Kalvachev CVS wrote:
> CVS change done by Ivan Kalvachev CVS
> 
> Update of /cvsroot/mplayer/main
> In directory mail:/var2/tmp/cvs-serv9908
> 
> Modified Files:
> 	subreader.c 
> Log Message:
> make -dumpsrtsub output in DOS LF/CR format just like original SubRip does
> patch by Adam Tlalka <atlka at pg.gda.pl>
> 
> 
> Index: subreader.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/subreader.c,v
> retrieving revision 1.144
> retrieving revision 1.145
> diff -u -r1.144 -r1.145
> --- subreader.c	1 Jun 2005 09:01:41 -0000	1.144
> +++ subreader.c	8 Oct 2005 20:56:37 -0000	1.145
> @@ -2038,7 +2038,7 @@
>      for(i=0; i < subd->sub_num; i++)
>      {
>          onesub=subs+i;    //=&subs[i];
> -	fprintf(fd,"%d\n",i+1);//line number
> +	fprintf(fd,"%d\r\n",i+1);//line number

Not only was this patch under discussion; it's blatently WRONG! The
file is opened in "w" mode, not "wb", so on windows it will write
\r\r\n for each newline (or at least the libc can, and still be
compliant.. actually if it's opened in "w" mode the behavior of
writing \r explicitly is probably totally undefined). If you're going
to write the file as binary you must open it in binary mode!

IMO all of this goes to show that it's wrong to commit a controversial
patch as quickly as you can to get it by the people who are objecting.
If you want to discuss a compromise please do so on -dev-eng rather
than just applying broken patches!!

Oh, and here's your 10l cola I forgot to give... :))

Rich




More information about the MPlayer-cvslog mailing list