libav_verbose flag

This commit is contained in:
Dr. Chat 2015-08-29 22:11:59 -05:00
parent e3d87b1715
commit afa013f4bf
1 changed files with 7 additions and 4 deletions

View File

@ -7,8 +7,11 @@
******************************************************************************
*/
#include "xenia/apu/xma_context.h"
#include "xenia/apu/xma_decoder.h"
#include <gflags/gflags.h>
#include "xenia/apu/xma_context.h"
#include "xenia/base/logging.h"
#include "xenia/base/math.h"
#include "xenia/base/ring_buffer.h"
@ -46,6 +49,8 @@ extern "C" {
// do this, it's likely they are either passing the context to XAudio or
// using the XMA* functions.
DEFINE_bool(libav_verbose, false, "Verbose libav output (debug and above)");
namespace xe {
namespace apu {
@ -55,11 +60,9 @@ XmaDecoder::XmaDecoder(cpu::Processor* processor)
XmaDecoder::~XmaDecoder() = default;
void av_log_callback(void* avcl, int level, const char* fmt, va_list va) {
#ifdef NDEBUG
if (level > AV_LOG_WARNING) {
if (!FLAGS_libav_verbose && level > AV_LOG_WARNING) {
return;
}
#endif
char level_char = '?';
switch (level) {