summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Reufer <thomas@reufer.ch>2014-07-01 07:54:34 +0200
committerThomas Reufer <thomas@reufer.ch>2014-07-01 07:54:34 +0200
commit74e8d735762db963c1c31d427eb6ec80f8696b1c (patch)
tree272182032249d2c0c8f5d871bce09dae23cec422
parent94b323fdb19a7f5b57a67aa3f814350f4c78ff90 (diff)
downloadvdr-plugin-rpihddevice-74e8d735762db963c1c31d427eb6ec80f8696b1c.tar.gz
vdr-plugin-rpihddevice-74e8d735762db963c1c31d427eb6ec80f8696b1c.tar.bz2
replace av_log_format_line by vsnprintf to be compatible with libav
-rw-r--r--audio.c10
-rw-r--r--audio.h1
2 files changed, 4 insertions, 7 deletions
diff --git a/audio.c b/audio.c
index 8e08bf4..545c298 100644
--- a/audio.c
+++ b/audio.c
@@ -1035,20 +1035,18 @@ void cRpiAudioDecoder::SetCodec(cAudioCodec::eCodec codec, unsigned int &channel
}
}
-int cRpiAudioDecoder::s_printPrefix = 1;
-
void cRpiAudioDecoder::Log(void* ptr, int level, const char* fmt, va_list vl)
{
if (level == AV_LOG_QUIET)
return;
char line[128];
- av_log_format_line(ptr, level, fmt, vl, line, sizeof(line), &s_printPrefix);
+ vsnprintf(line, sizeof(line), fmt, vl);
if (level <= AV_LOG_ERROR)
- ELOG("%s", line);
+ ELOG("[libav] %s", line);
else if (level <= AV_LOG_INFO)
- ILOG("%s", line);
+ ILOG("[libav] %s", line);
else if (level <= AV_LOG_VERBOSE)
- DLOG("%s", line);
+ DLOG("[libav] %s", line);
}
diff --git a/audio.h b/audio.h
index d16b216..d0da5db 100644
--- a/audio.h
+++ b/audio.h
@@ -41,7 +41,6 @@ protected:
void HandleAudioSetupChanged();
static void Log(void* ptr, int level, const char* fmt, va_list vl);
- static int s_printPrefix;
struct Codec
{