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

Reimar Döffinger Reimar.Doeffinger
Wed Jul 28 18:16:04 CEST 2010


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).
I just can't help but think this solution is worse than the problem it is
supposed to fix.



More information about the ffmpeg-cvslog mailing list