aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-03-28 19:48:57 +0200
committerMax Kellermann <max@duempel.org>2010-03-28 19:48:57 +0200
commit8446b70ddc08d89738520ae5f064284779ac68a1 (patch)
tree2740e8584a4ce14dad821c5b2076c20b2a4f9e09 /src
parent635791d1cdb1db47096572cfbb13351ab6e3f57f (diff)
downloadmpd-8446b70ddc08d89738520ae5f064284779ac68a1.tar.gz
mpd-8446b70ddc08d89738520ae5f064284779ac68a1.tar.xz
mpd-8446b70ddc08d89738520ae5f064284779ac68a1.zip
decoder/ffmpeg: print item name in log callback
Diffstat (limited to 'src')
-rw-r--r--src/decoder/ffmpeg_decoder_plugin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c
index ee87816de..d4d6224d2 100644
--- a/src/decoder/ffmpeg_decoder_plugin.c
+++ b/src/decoder/ffmpeg_decoder_plugin.c
@@ -67,7 +67,11 @@ static void
mpd_ffmpeg_log_callback(G_GNUC_UNUSED void *ptr, int level,
const char *fmt, va_list vl)
{
- g_logv(G_LOG_DOMAIN, level_ffmpeg_to_glib(level), fmt, vl);
+ const AVClass *cls = *(const AVClass *const*)ptr;
+ char *domain = g_strconcat(G_LOG_DOMAIN, "/", cls->item_name(ptr), NULL);
+
+ g_logv(domain, level_ffmpeg_to_glib(level), fmt, vl);
+ g_free(domain);
}
#endif /* !OLD_FFMPEG_INCLUDES */