commit 226573cd4846558620e4401f988e30765ccdfc86
parent 5eafb01bbb8c7e151a9e08f9981626814d2933bd
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 13 Jan 2010 16:12:56 +0000
reduce logging
Diffstat:
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/plugins/id3_extractor.c b/src/plugins/id3_extractor.c
@@ -272,7 +272,6 @@ EXTRACTOR_id3_extract (const char *data,
char track[16];
int ret;
- fprintf (stderr, "called with %llu bytes\n", (unsigned long long) size);
if (OK != get_id3 (data, size, &info))
return 0;
if (strlen (info.title) > 0)
diff --git a/src/plugins/thumbnailqt_extractor.cc b/src/plugins/thumbnailqt_extractor.cc
@@ -43,6 +43,14 @@
extern "C"
{
+
+static void
+mh (QtMsgType mtype, const char *msg)
+{
+ /* just discard */
+}
+
+
int
EXTRACTOR_thumbnailqt_extract (const char *data,
size_t size,
@@ -57,7 +65,9 @@ EXTRACTOR_thumbnailqt_extract (const char *data,
unsigned long height;
char format[64];
QImage::Format colors;
+ QtMsgHandler oh;
+ oh = qInstallMsgHandler (&mh);
/* Determine image format to use */
if (options == NULL)
colors = QImage::Format_Indexed8;
@@ -106,6 +116,7 @@ EXTRACTOR_thumbnailqt_extract (const char *data,
if ( (height == 0) || (width == 0) )
{
delete img;
+ qInstallMsgHandler (oh);
return 0;
}
snprintf(format,
@@ -122,6 +133,7 @@ EXTRACTOR_thumbnailqt_extract (const char *data,
strlen(format)+1))
{
delete img;
+ qInstallMsgHandler (oh);
return 1;
}
/* Change color depth */
@@ -154,6 +166,7 @@ EXTRACTOR_thumbnailqt_extract (const char *data,
buffer.setBuffer(&bytes);
buffer.open(QIODevice::WriteOnly);
thumb.save(&buffer, "PNG");
+ qInstallMsgHandler (oh);
return proc (proc_cls,
"thumbnailqt",
EXTRACTOR_METATYPE_THUMBNAIL,