[MPlayer-dev-eng] [PATCH] printf warning fixes (REPOST) NOSPAM
The Wanderer
inverseparadox at comcast.net
Tue Jan 10 20:34:49 CET 2006
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..
Perhaps even better than a no-op function: one which calls
mp_msg(MSGT_FIXME, MSGL_FIXME, ...) (or comparable). Has the advantage
of not eliminating the text which would have been output, while still
preventing its being printed via stdout.
--
The Wanderer
Warning: Simply because I argue an issue does not mean I agree with any
side of it.
Secrecy is the beginning of tyranny.
More information about the MPlayer-dev-eng
mailing list