[MPlayer-dev-eng] [PATCH] printf warning fixes (REPOST)

Rich Felker dalias at aerifal.cx
Tue Jan 10 19:50:10 CET 2006


On Tue, Jan 10, 2006 at 10:20:20AM +0100, Diego Biurrun wrote:
> On Tue, Jan 10, 2006 at 01:09:16AM +0100, Dominik 'Rathann' Mierzejewski wrote:
> > --- MPlayer-20051225/liba52/parse.c.printf	2005-04-07 22:07:53.000000000 +0200
> > +++ MPlayer-20051225/liba52/parse.c	2005-12-25 14:09:37.000000000 +0100
> > @@ -71,7 +73,7 @@
> >  #endif
> >      if(((int)samples%16) && (mm_accel&MM_ACCEL_X86_SSE)){
> >        mm_accel &=~MM_ACCEL_X86_SSE;
> > -      printf("liba52: unable to get 16 byte aligned memory disabling usage of SSE instructions\n");
> > +      mp_msg(MSGT_DECAUDIO,MSGL_V,"liba52: unable to get 16 byte aligned memory disabling usage of SSE instructions\n");
> 
> This is an imported library, don't change the printfs in there.  Commit
> the rest of the printf --> mp_msg changes.

It needs to be fixed anyway, since any call to printf is a BUG that
will prevent stdout from being usable. Personally in the case of such
buggy libraries I would say extend them to use a callback function
that MPlayer will define. Alternatively we could just replace printf
with our own no-op function in MPlayer, so that external code calls
our printf instead..

Rich




More information about the MPlayer-dev-eng mailing list