[FFmpeg-cvslog] r24573 - trunk/libavutil/log.c

Michael Niedermayer michaelni
Thu Jul 29 15:41:17 CEST 2010


On Wed, Jul 28, 2010 at 06:16:04PM +0200, Reimar D?ffinger wrote:
> On Wed, Jul 28, 2010 at 02:08:26PM +0200, michael wrote:
> > Author: michael
> > Date: Wed Jul 28 14:08:26 2010
> > New Revision: 24573
> > 
> > Log:
> > Make sure "Last message repeated" is printed.
> > 
> > Modified:
> >    trunk/libavutil/log.c
> > 
> > Modified: trunk/libavutil/log.c
> > ==============================================================================
> > --- trunk/libavutil/log.c	Wed Jul 28 12:29:41 2010	(r24572)
> > +++ trunk/libavutil/log.c	Wed Jul 28 14:08:26 2010	(r24573)
> > @@ -105,6 +105,7 @@ void av_log_default_callback(void* ptr, 
> >      print_prefix= line[strlen(line)-1] == '\n';
> >      if(print_prefix && !strcmp(line, prev)){
> >          count++;
> > +        fprintf(stderr, "    Last message repeated %d times\r", count);
> >          return;
> >      }
> 
> I don't think that really is a good solution, it will look horribly when
> some redirects the output (e.g. for a big report), and it will have
> rather annoying side-effects if something else prints not using that function
> (though the "Last message" part was wrong even then, but at least it did
> not look bad).

its a default callback, a user app can override it.
Also we can add a way for user apps to disable the last message stuff
completely or to disable this change.

Though this one does not only fix the lack of a last "repeated message"
it also fixes the lack of feedback to the user if only the same message is
printed repeatly


> I just can't help but think this solution is worse than the problem it is
> supposed to fix.

suggest something better

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20100729/288dc5ab/attachment.pgp>



More information about the ffmpeg-cvslog mailing list