[FFmpeg-devel] superfluous log messages
Don Moir
donmoir at comcast.net
Fri May 11 20:16:26 CEST 2012
>> Probably would be good to put the test in av_log as well. This way
>> the logic in av_log is turned off such as va_start etc and no
>> additional function call. Mostly av_log is called which calls
>> av_vlog.
>>
>> No need to call av_vlog either from av_log and just call
>> av_log_callback from av_log if it gets that far.
> the callbak is non NULL for the overwhelming majority of users.
> also av_log() should not be called in performance relevant code
> and actually i dont think it is. think about it, if it was you would
> get hundread thousand lines of text output per second at debug level
> also such uses would need to be protected by a check before calling
> av_log() not a check inside av_log()
Not trying to make a big deal of this and at the point where I am looking
more or less at minor things like this.
I have some files where it's called over a thousand times over a minutes
time and still not a big deal. The default behavior hides this for the most
part, but it still gets called with redundant messages and reduntant
processing. Also the default behavior is going nowhere in a GUI app so good
to be able to at least turn the processing for this off by calling
av_set_log_callback.
> also such uses would need to be protected by a check before calling
> av_log() not a check inside av_log()
Exactly, but I didn't think that would be in the realm of a change that
would be desirable.
Thanks for putting the NULL check in.
More information about the ffmpeg-devel
mailing list