Revision 3fe1ec39

View differences:

libavutil/avutil.h
41 41

  
42 42
#define LIBAVUTIL_VERSION_MAJOR 50
43 43
#define LIBAVUTIL_VERSION_MINOR 15
44
#define LIBAVUTIL_VERSION_MICRO  1
44
#define LIBAVUTIL_VERSION_MICRO  2
45 45

  
46 46
#define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
47 47
                                               LIBAVUTIL_VERSION_MINOR, \
libavutil/log.c
89 89

  
90 90
void av_log(void* avcl, int level, const char *fmt, ...)
91 91
{
92
    AVClass* avc= avcl ? *(AVClass**)avcl : NULL;
92 93
    va_list vl;
93 94
    va_start(vl, fmt);
95
    if(avc && avc->version >= (50<<16 | 15<<8 | 2) && avc->log_level_offset_offset && level>=AV_LOG_FATAL)
96
        level += *(int*)(((uint8_t*)avcl) + avc->log_level_offset_offset);
94 97
    av_vlog(avcl, level, fmt, vl);
95 98
    va_end(vl);
96 99
}
libavutil/log.h
56 56
     */
57 57

  
58 58
    int version;
59

  
60
    /**
61
     * Offset in the structure where log_level_offset is stored.
62
     * 0 means there is no such variable
63
     */
64
    int log_level_offset_offset;
59 65
} AVClass;
60 66

  
61 67
/* av_log API */

Also available in: Unified diff