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
362 362
363void av_log(void* avcl, int level, const char *fmt, ...)363void 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
375void av_vlog(void* avcl, int level, const char *fmt, va_list vl)371void 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}

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