[MPlayer-dev-eng] [PATCH] printf warning fixes (REPOST) NOSPAM
Diego Biurrun
diego at biurrun.de
Thu Jan 12 12:32:08 CET 2006
On Tue, Jan 10, 2006 at 01:51:17PM -0500, Rich Felker wrote:
> 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..
We'd need to decide this once and implement it for all imported
libraries. Until then I am for keeping the current policy of leaving
imported code alone. Besides right now patching liba52 would be a bad
idea since a patch to update it to the latest version has been posted.
Diego
More information about the MPlayer-dev-eng
mailing list