[XMA] Add default case in av_log_callback.

This commit is contained in:
gibbed 2019-09-05 23:02:16 -05:00 committed by Rick Gibbed
parent ce955e5aaa
commit 134067d25e
1 changed files with 15 additions and 5 deletions

View File

@ -67,27 +67,37 @@ void av_log_callback(void* avcl, int level, const char* fmt, va_list va) {
char level_char = '?'; char level_char = '?';
LogLevel log_level; LogLevel log_level;
switch (level) { switch (level) {
case AV_LOG_ERROR: case AV_LOG_ERROR: {
level_char = '!'; level_char = '!';
log_level = xe::LogLevel::Error; log_level = xe::LogLevel::Error;
break; break;
case AV_LOG_WARNING: }
case AV_LOG_WARNING: {
level_char = 'w'; level_char = 'w';
log_level = xe::LogLevel::Warning; log_level = xe::LogLevel::Warning;
break; break;
case AV_LOG_INFO: }
case AV_LOG_INFO: {
level_char = 'i'; level_char = 'i';
log_level = xe::LogLevel::Info; log_level = xe::LogLevel::Info;
break; break;
case AV_LOG_VERBOSE: }
case AV_LOG_VERBOSE: {
level_char = 'v'; level_char = 'v';
log_level = xe::LogLevel::Debug; log_level = xe::LogLevel::Debug;
break; break;
case AV_LOG_DEBUG: }
case AV_LOG_DEBUG: {
level_char = 'd'; level_char = 'd';
log_level = xe::LogLevel::Debug; log_level = xe::LogLevel::Debug;
break; break;
} }
default: {
level_char = '?';
log_level = xe::LogLevel::Debug;
break;
}
}
StringBuffer buff; StringBuffer buff;
buff.AppendVarargs(fmt, va); buff.AppendVarargs(fmt, va);