[FFmpeg-devel] [PATCH v3 1/4] avutil/log: Add callback for context prefix formatting

Hendrik Leppkes h.leppkes at gmail.com
Fri Mar 7 19:30:43 EET 2025


On Fri, Mar 7, 2025 at 6:23 PM Soft Works
<softworkz-at-hotmail.com at ffmpeg.org> wrote:
>
>
>
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> > Nicolas George
> > Sent: Freitag, 7. März 2025 10:44
> > To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> > Subject: Re: [FFmpeg-devel] [PATCH v3 1/4] avutil/log: Add callback for
> > context prefix formatting
> >
> > softworkz (HE12025-03-06):
> > > From: softworkz <softworkz at hotmail.com>
> > >
> > > also adds a log flag AV_LOG_PRINT_MEMADDRESSES, which is meant to
> > > control prefix formatting. The actual formatting has to be performed
> > > by the consuming application which needs to provide a formatting
> > > callback via av_log_set_formatprefix_callback.
> >
> > Still more global state in the libraries.
>
> You mean the callback?
>

Yes. You are also adding a new callback thats used from within a
callback, if someone uses av_log_set_callback then it might just not
get used.
So instead, why not provide a different implementation of the log
callback and use the existing av_log_set_callback function? Then no
library changes are needed at all.

- Hendrik


More information about the ffmpeg-devel mailing list