History

avutil/log: Move log_level_offset_offset code from av_log() to v_log()

Michael Niedermayer committed 6 years ago

Commit 07b3dbb1 parent 7b7f9751 file · +4 −4Browse files

Unified · Split

libavutil/log.c+4−4
@@ -362,19 +362,19 @@ static void (*av_log_callback)(void*, int, const char*, va_list) = · 361 unmodified lines
362362
363363 void av_log(void* avcl, int level, const char *fmt, ...)
364364 {
365− AVClass* avc = avcl ? *(AVClass **) avcl : NULL;
366365 va_list vl;
367366 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);
371367 av_vlog(avcl, level, fmt, vl);
372368 va_end(vl);
373369 }
374370
375371 void av_vlog(void* avcl, int level, const char *fmt, va_list vl)
376372 {
373+ AVClass* avc = avcl ? *(AVClass **) avcl : NULL;
377374 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);
378378 if (log_callback)
379379 log_callback(avcl, level, fmt, vl);
380380 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t