[FFmpeg-devel] [PATCH] avformat/dump.c: fix mixed log levels
Michael Niedermayer
michael at niedermayer.cc
Fri May 13 03:18:28 CEST 2016
On Thu, May 12, 2016 at 04:38:41PM +0200, Tobias Rapp wrote:
> On 12.05.2016 16:00, Michael Niedermayer wrote:
> >On Thu, May 12, 2016 at 10:26:03AM +0200, Tobias Rapp wrote:
> >>Previously a partial log message without newline was printed in case of
> >>loglevel=warning.
> >>
> >>Signed-off-by: Tobias Rapp <t.rapp at noa-archive.com>
> >>---
> >> libavformat/dump.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >>diff --git a/libavformat/dump.c b/libavformat/dump.c
> >>index d6a3249..9eb6146 100644
> >>--- a/libavformat/dump.c
> >>+++ b/libavformat/dump.c
> >>@@ -422,7 +422,7 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
> >> dump_mastering_display_metadata(ctx, &sd);
> >> break;
> >> default:
> >>- av_log(ctx, AV_LOG_WARNING,
> >>+ av_log(ctx, AV_LOG_INFO,
> >
> >this is ok if its wanted to change the log level
> >is that wanted ?
> >
> >if not the \n would have to be printed with the max log level
> >that was used so its not missning
> >
> >[..]
> >
>
> I guess this wouldn't be enough. Also the whitespace separator log
> level has to be adapted, which will then produce confusing output in
> case of mixed known/unknown side data together with
> loglevel=warning.
>
> A better option would be to assemble the log message into a buffer
> first using av_bprintf and then av_log the complete message either
> with AV_LOG_INFO or AV_LOG_WARNING depending on whether only known
> side data was found or not?
>
> Or maybe always print the (assembled) side data info with
> AV_LOG_INFO plus additional AV_LOG_WARNING for each unknown side
> data item?
sounds like a complex mess, ill apply the patch as its simpler and
noone objected
it can always be replaced by another solution
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160513/ded30b4d/attachment.sig>
More information about the ffmpeg-devel
mailing list