[XviD-devel] OutputDebugString in portab.h

Kurt Pruenner leak at gmx.at
Sat Jun 2 13:05:16 CEST 2007

Lately, I'm getting a build error in xvidcore's portab.h when compiling
the debug version of ffdshow's XviD support, as doing an Unicode build
maps OutputDebugString to OutputDebugStringW, which of course doesn't
like the char* that's passed to it in your implementation of DPRINTF.

Using OutputDebugStringA directly instead (since the buffer is a char[]
anyway) fixes the problem - which in itself is quite bogus because
DPRINTF isn't even used here, but meh...

Patch, as trivial as it may be, attached - I don't think it can cause
any negative side effects...

Kurt Bernhard Pruenner --- Haendelstrasse 17 --- 4020 Linz --- Austria
.......It might be written "Mindfuck", but it's spelt "L-A-I-N".......
np: Mouse On Mars - Flim (Glam)
-------------- next part --------------
diff -urN xvid_20070602.orig/xvidcore/src/portab.h xvid_20070602/xvidcore/src/portab.h
--- xvid_20070602.orig/xvidcore/src/portab.h	2006-05-28 09:52:46.000000000 +0200
+++ xvid_20070602/xvidcore/src/portab.h	2007-06-02 12:44:31.390625000 +0200
@@ -132,7 +132,7 @@
 		va_start(args, fmt);
 		vsprintf(buf, fmt, args);
-		OutputDebugString(buf);
+		OutputDebugStringA(buf);
 		fprintf(stderr, "%s", buf);

More information about the XviD-devel mailing list