void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)

{

    static int print_prefix = 1;

    static int count;

    static char prev[LINE_SZ];

    AVBPrint part[4];

    char line[LINE_SZ];

    static int is_atty;

    int type[2];

    unsigned tint = 0;



    if (level >= 0) {

        tint = level & 0xff00;

        level &= 0xff;

    }



    if (level > av_log_level)

        return;

#if HAVE_PTHREADS

    pthread_mutex_lock(&mutex);

#endif



    format_line(ptr, level, fmt, vl, part, &print_prefix, type);

    snprintf(line, sizeof(line), "%s%s%s%s", part[0].str, part[1].str, part[2].str, part[3].str);



#if HAVE_ISATTY

    if (!is_atty)

        is_atty = isatty(2) ? 1 : -1;

#endif



    if (print_prefix && (flags & AV_LOG_SKIP_REPEATED) && !strcmp(line, prev) &&

        *line && line[strlen(line) - 1] != '\r'){

        count++;

        if (is_atty == 1)

            fprintf(stderr, "    Last message repeated %d times\r", count);

        goto end;

    }

    if (count > 0) {

        fprintf(stderr, "    Last message repeated %d times\n", count);

        count = 0;

    }

    strcpy(prev, line);

    sanitize(part[0].str);

    colored_fputs(type[0], 0, part[0].str);

    sanitize(part[1].str);

    colored_fputs(type[1], 0, part[1].str);

    sanitize(part[2].str);

    colored_fputs(av_clip(level >> 3, 0, NB_LEVELS - 1), tint >> 8, part[2].str);

    sanitize(part[3].str);

    colored_fputs(av_clip(level >> 3, 0, NB_LEVELS - 1), tint >> 8, part[3].str);



#if CONFIG_VALGRIND_BACKTRACE

    if (level <= BACKTRACE_LOGLEVEL)

        VALGRIND_PRINTF_BACKTRACE("%s", "");

#endif

end:

    av_bprint_finalize(part+3, NULL);

#if HAVE_PTHREADS

    pthread_mutex_unlock(&mutex);

#endif

}

void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)

{

    static int print_prefix = 1;

    static int count;

    static char prev[LINE_SZ];

    AVBPrint part[4];

    char line[LINE_SZ];

    static int is_atty;

    int type[2];

    unsigned tint = 0;



    if (level >= 0) {

        tint = level & 0xff00;

        level &= 0xff;

    }



    if (level > av_log_level)

        return;

#if HAVE_PTHREADS

    pthread_mutex_lock(&mutex);

#endif



    format_line(ptr, level, fmt, vl, part, &print_prefix, type);

    snprintf(line, sizeof(line), "%s%s%s%s", part[0].str, part[1].str, part[2].str, part[3].str);



#if HAVE_ISATTY

    if (!is_atty)

        is_atty = isatty(2) ? 1 : -1;

#endif



    if (print_prefix && (flags & AV_LOG_SKIP_REPEATED) && !strcmp(line, prev) &&

        *line && line[strlen(line) - 1] != '\r'){

        count++;

        if (is_atty == 1)

            fprintf(stderr, "    Last message repeated %d times\r", count);

        goto end;

    }

    if (count > 0) {

        fprintf(stderr, "    Last message repeated %d times\n", count);

        count = 0;

    }

    strcpy(prev, line);

    sanitize(part[0].str);

    colored_fputs(type[0], 0, part[0].str);

    sanitize(part[1].str);

    colored_fputs(type[1], 0, part[1].str);

    sanitize(part[2].str);

    colored_fputs(av_clip(level >> 3, 0, NB_LEVELS - 1), tint >> 8, part[2].str);

    sanitize(part[3].str);

    colored_fputs(av_clip(level >> 3, 0, NB_LEVELS - 1), tint >> 8, part[3].str);



#if CONFIG_VALGRIND_BACKTRACE

    if (level <= BACKTRACE_LOGLEVEL)

        VALGRIND_PRINTF_BACKTRACE("%s", "");

#endif

end:

    av_bprint_finalize(part+3, NULL);

#if HAVE_PTHREADS

    pthread_mutex_unlock(&mutex);

#endif

}

void FUNC_0(void* VAR_0, int VAR_1, const char* VAR_2, va_list VAR_3)

{

    static int VAR_4 = 1;

    static int VAR_5;

    static char VAR_6[LINE_SZ];

    AVBPrint part[4];

    char VAR_7[LINE_SZ];

    static int VAR_8;

    int VAR_9[2];

    unsigned VAR_10 = 0;



    if (VAR_1 >= 0) {

        VAR_10 = VAR_1 & 0xff00;

        VAR_1 &= 0xff;

    }



    if (VAR_1 > av_log_level)

        return;

#if HAVE_PTHREADS

    pthread_mutex_lock(&mutex);

#endif



    format_line(VAR_0, VAR_1, VAR_2, VAR_3, part, &VAR_4, VAR_9);

    snprintf(VAR_7, sizeof(VAR_7), "%s%s%s%s", part[0].str, part[1].str, part[2].str, part[3].str);



#if HAVE_ISATTY

    if (!VAR_8)

        VAR_8 = isatty(2) ? 1 : -1;

#endif



    if (VAR_4 && (flags & AV_LOG_SKIP_REPEATED) && !strcmp(VAR_7, VAR_6) &&

        *VAR_7 && VAR_7[strlen(VAR_7) - 1] != '\r'){

        VAR_5++;

        if (VAR_8 == 1)

            fprintf(stderr, "    Last message repeated %d times\r", VAR_5);

        goto end;

    }

    if (VAR_5 > 0) {

        fprintf(stderr, "    Last message repeated %d times\n", VAR_5);

        VAR_5 = 0;

    }

    strcpy(VAR_6, VAR_7);

    sanitize(part[0].str);

    colored_fputs(VAR_9[0], 0, part[0].str);

    sanitize(part[1].str);

    colored_fputs(VAR_9[1], 0, part[1].str);

    sanitize(part[2].str);

    colored_fputs(av_clip(VAR_1 >> 3, 0, NB_LEVELS - 1), VAR_10 >> 8, part[2].str);

    sanitize(part[3].str);

    colored_fputs(av_clip(VAR_1 >> 3, 0, NB_LEVELS - 1), VAR_10 >> 8, part[3].str);



#if CONFIG_VALGRIND_BACKTRACE

    if (VAR_1 <= BACKTRACE_LOGLEVEL)

        VALGRIND_PRINTF_BACKTRACE("%s", "");

#endif

end:

    av_bprint_finalize(part+3, NULL);

#if HAVE_PTHREADS

    pthread_mutex_unlock(&mutex);

#endif

}

void FUNC_0(void* VAR_0, int VAR_1, const char* VAR_2, va_list VAR_3)
{ static int VAR_4 = 1; static int VAR_5; static char VAR_6[LINE_SZ]; AVBPrint part[4]; char VAR_7[LINE_SZ]; static int VAR_8; int VAR_9[2]; unsigned VAR_10 = 0; if (VAR_1 >= 0) { VAR_10 = VAR_1 & 0xff00; VAR_1 &= 0xff; } if (VAR_1 > av_log_level)
return; #if HAVE_PTHREADS
pthread_mutex_lock(&mutex); #endif
format_line(VAR_0, VAR_1, VAR_2, VAR_3, part, &VAR_4, VAR_9); snprintf(VAR_7, sizeof(VAR_7), "%s%s%s%s", part[0].str, part[1].str, part[2].str, part[3].str); #if HAVE_ISATTY
if (!VAR_8)
VAR_8 = isatty(2) ? 1 : -1; #endif
if (VAR_4 && (flags & AV_LOG_SKIP_REPEATED) && !strcmp(VAR_7, VAR_6) &&
*VAR_7 && VAR_7[strlen(VAR_7) - 1] != '\r'){ VAR_5++; if (VAR_8 == 1)
fprintf(stderr, "    Last message repeated %d times\r", VAR_5); goto end; } if (VAR_5 > 0) { fprintf(stderr, "    Last message repeated %d times\n", VAR_5); VAR_5 = 0; } strcpy(VAR_6, VAR_7); sanitize(part[0].str); colored_fputs(VAR_9[0], 0, part[0].str); sanitize(part[1].str); colored_fputs(VAR_9[1], 0, part[1].str); sanitize(part[2].str); colored_fputs(av_clip(VAR_1 >> 3, 0, NB_LEVELS - 1), VAR_10 >> 8, part[2].str); sanitize(part[3].str); colored_fputs(av_clip(VAR_1 >> 3, 0, NB_LEVELS - 1), VAR_10 >> 8, part[3].str); #if CONFIG_VALGRIND_BACKTRACE
if (VAR_1 <= BACKTRACE_LOGLEVEL)
VALGRIND_PRINTF_BACKTRACE("%s", ""); #endif
end:
av_bprint_finalize(part+3, NULL); #if HAVE_PTHREADS
pthread_mutex_unlock(&mutex); #endif
}