Mercurial > libavutil.hg
diff log.c @ 917:3ab411c447c4 libavutil
Add means to adjust the log level per context.
author | michael |
---|---|
date | Sat, 08 May 2010 20:41:20 +0000 |
parents | 3f0ed02fff47 |
children | 2acb0b1891c0 |
line wrap: on
line diff
--- a/log.c Wed May 05 21:44:47 2010 +0000 +++ b/log.c Sat May 08 20:41:20 2010 +0000 @@ -89,8 +89,11 @@ void av_log(void* avcl, int level, const char *fmt, ...) { + AVClass* avc= avcl ? *(AVClass**)avcl : NULL; va_list vl; va_start(vl, fmt); + if(avc && avc->version >= (50<<16 | 15<<8 | 2) && avc->log_level_offset_offset && level>=AV_LOG_FATAL) + level += *(int*)(((uint8_t*)avcl) + avc->log_level_offset_offset); av_vlog(avcl, level, fmt, vl); va_end(vl); }