[FFmpeg-devel] [PATCH] Replace dprintf with av_dlog

Måns Rullgård mans
Sat Jan 29 19:15:27 CET 2011


Luca Barbato <lu_zero at gentoo.org> writes:

> On 01/29/2011 06:30 PM, Diego Biurrun wrote:
>> On Sat, Jan 29, 2011 at 05:49:02PM +0100, Luca Barbato wrote:
>>> dprintf clashes with POSIX.1-2008
>> 
>> Nice work, you beat me to it :)
>
> Sed did most of the work
>> 
>> Maybe av_dbglog is a slightly more intuitive name?
>
> Not sure, I prefer dlog since it is shorter.

+1

>>> --- a/libavcodec/mpeg12enc.c
>>> +++ b/libavcodec/mpeg12enc.c
>>> @@ -890,7 +890,7 @@ static void mpeg1_encode_block(MpegEncContext *s,
>>>  #if 0
>>>          if (level != 0)
>>> -            dprintf(s->avctx, "level[%d]=%d\n", i, level);
>>> +            av_dlog(s->avctx, "level[%d]=%d\n", i, level);
>>>  #endif
>> 
>> There is a lot of '#if 0' code in FFmpeg, how about dropping some of it?
>
> We might look at it soon.

There are 182 instances of #if 0 currently.  Reducing that would be a
good thing for sure.

>>> --- a/libavfilter/avfilter.c
>>> +++ b/libavfilter/avfilter.c
>>> @@ -217,24 +217,24 @@ static char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms)
>>>  
>>> -static void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end)
>>> +static void ff_av_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end)
>> 
>> Did you rename the functions on purpose?
>
> not on purpose, I'd drop the spurious av_.

+1

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list