|
|
@ -33,6 +33,7 @@ |
|
|
|
static |
|
|
|
static |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
int av_log_level = AV_LOG_INFO; |
|
|
|
int av_log_level = AV_LOG_INFO; |
|
|
|
|
|
|
|
static int flags; |
|
|
|
|
|
|
|
|
|
|
|
#if defined(_WIN32) && !defined(__MINGW32CE__) |
|
|
|
#if defined(_WIN32) && !defined(__MINGW32CE__) |
|
|
|
#include <windows.h> |
|
|
|
#include <windows.h> |
|
|
@ -109,8 +110,9 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl) |
|
|
|
if(!detect_repeats) detect_repeats= isatty(2) ? 1 : -1; |
|
|
|
if(!detect_repeats) detect_repeats= isatty(2) ? 1 : -1; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
if(print_prefix && detect_repeats==1 && !strcmp(line, prev)){ |
|
|
|
if(print_prefix && (flags & AV_LOG_SKIP_REPEATED) && !strcmp(line, prev)){ |
|
|
|
count++; |
|
|
|
count++; |
|
|
|
|
|
|
|
if(detect_repeats==1) |
|
|
|
fprintf(stderr, " Last message repeated %d times\r", count); |
|
|
|
fprintf(stderr, " Last message repeated %d times\r", count); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -150,6 +152,11 @@ void av_log_set_level(int level) |
|
|
|
av_log_level = level; |
|
|
|
av_log_level = level; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void av_log_set_flags(int arg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
flags= arg; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void av_log_set_callback(void (*callback)(void*, int, const char*, va_list)) |
|
|
|
void av_log_set_callback(void (*callback)(void*, int, const char*, va_list)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
av_log_callback = callback; |
|
|
|
av_log_callback = callback; |
|
|
|