1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-03 01:39:58 +02:00

Cosmetic (rename detect_repeats to is_atty which matches the truth)

Originally committed as revision 25177 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2010-09-24 16:18:10 +00:00
parent 3f07e8dbee
commit 8a19053361

View File

@ -86,7 +86,7 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
static int print_prefix=1; static int print_prefix=1;
static int count; static int count;
static char line[1024], prev[1024]; static char line[1024], prev[1024];
static int detect_repeats; static int is_atty;
AVClass* avc= ptr ? *(AVClass**)ptr : NULL; AVClass* avc= ptr ? *(AVClass**)ptr : NULL;
if(level>av_log_level) if(level>av_log_level)
return; return;
@ -107,12 +107,12 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
print_prefix= line[strlen(line)-1] == '\n'; print_prefix= line[strlen(line)-1] == '\n';
#if HAVE_ISATTY #if HAVE_ISATTY
if(!detect_repeats) detect_repeats= isatty(2) ? 1 : -1; if(!is_atty) is_atty= isatty(2) ? 1 : -1;
#endif #endif
if(print_prefix && (flags & AV_LOG_SKIP_REPEATED) && !strcmp(line, prev)){ if(print_prefix && (flags & AV_LOG_SKIP_REPEATED) && !strcmp(line, prev)){
count++; count++;
if(detect_repeats==1) if(is_atty==1)
fprintf(stderr, " Last message repeated %d times\r", count); fprintf(stderr, " Last message repeated %d times\r", count);
return; return;
} }