Unified · Split
| @@ -362,19 +362,19 @@ static void (*av_log_callback)(void*, int, const char*, va_list) = · 361 unmodified lines | |||
| 362 | 362 | ||
| 363 | void av_log(void* avcl, int level, const char *fmt, ...) | 363 | void av_log(void* avcl, int level, const char *fmt, ...) |
| 364 | { | 364 | { |
| 365 | AVClass* avc = avcl ? *(AVClass **) avcl : NULL; | ||
| 366 | va_list vl; | 365 | va_list vl; |
| 367 | va_start(vl, fmt); | 366 | va_start(vl, fmt); |
| 368 | if (avc && avc->version >= (50 << 16 | 15 << 8 | 2) && | ||
| 369 | avc->log_level_offset_offset && level >= AV_LOG_FATAL) | ||
| 370 | level += *(int *) (((uint8_t *) avcl) + avc->log_level_offset_offset); | ||
| 371 | av_vlog(avcl, level, fmt, vl); | 367 | av_vlog(avcl, level, fmt, vl); |
| 372 | va_end(vl); | 368 | va_end(vl); |
| 373 | } | 369 | } |
| 374 | 370 | ||
| 375 | void av_vlog(void* avcl, int level, const char *fmt, va_list vl) | 371 | void av_vlog(void* avcl, int level, const char *fmt, va_list vl) |
| 376 | { | 372 | { |
| 373 | AVClass* avc = avcl ? *(AVClass **) avcl : NULL; | ||
| 377 | void (*log_callback)(void*, int, const char*, va_list) = av_log_callback; | 374 | void (*log_callback)(void*, int, const char*, va_list) = av_log_callback; |
| 375 | if (avc && avc->version >= (50 << 16 | 15 << 8 | 2) && | ||
| 376 | avc->log_level_offset_offset && level >= AV_LOG_FATAL) | ||
| 377 | level += *(int *) (((uint8_t *) avcl) + avc->log_level_offset_offset); | ||
| 378 | if (log_callback) | 378 | if (log_callback) |
| 379 | log_callback(avcl, level, fmt, vl); | 379 | log_callback(avcl, level, fmt, vl); |
| 380 | } | 380 | } |