Unified · Split
| @@ -362,19 +362,19 @@ static void (*av_log_callback)(void*, int, const char*, va_list) = · 361 unmodified lines | ||
| 362 | 362 | |
| 363 | 363 | void av_log(void* avcl, int level, const char *fmt, ...) |
| 364 | 364 | { |
| 365 | − AVClass* avc = avcl ? *(AVClass **) avcl : NULL; | |
| 366 | 365 | va_list vl; |
| 367 | 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 | 367 | av_vlog(avcl, level, fmt, vl); |
| 372 | 368 | va_end(vl); |
| 373 | 369 | } |
| 374 | 370 | |
| 375 | 371 | void av_vlog(void* avcl, int level, const char *fmt, va_list vl) |
| 376 | 372 | { |
| 373 | + AVClass* avc = avcl ? *(AVClass **) avcl : NULL; | |
| 377 | 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 | 378 | if (log_callback) |
| 379 | 379 | log_callback(avcl, level, fmt, vl); |
| 380 | 380 | } |