[MPlayer-dev-eng] Latest SVN doesn' compile on MinGW

Georgi Petrov gogothebee at gmail.com
Tue Feb 3 00:17:35 CET 2009


Here we go again. I just submitted a patch for make distclean, but a
new problem just emerged after svn update.

after configure && make the compilation fails with:

gcc -Wundef -Wdisabled-optimization -Wdeclaration-after-statement
-std=gnu99 -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4
-march=pentium-m -mtune=pentium-m -pipe -ffast-math
-fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE -I.  -Ilibdvdread4
-I/usr/local/include/freetype2 -I/usr/local/include -Ilibdvdnav   -c
-o libmpcodecs/native/nuppelvideo.o libmpcodecs/native/nuppelvideo.c
libmpcodecs/native/nuppelvideo.c: In function `decode_nuv':
libmpcodecs/native/nuppelvideo.c:48: warning: passing arg 1 of
`RTjpeg_init_decompress' from incompatible pointer type
libmpcodecs/native/nuppelvideo.c:59: error: `LZO_OUTPUT_PADDING'
undeclared (first use in this function)
libmpcodecs/native/nuppelvideo.c:59: error: (Each undeclared
identifier is reported only once
libmpcodecs/native/nuppelvideo.c:59: error: for each function it appears in.)
libmpcodecs/native/nuppelvideo.c:78: warning: implicit declaration of
function `lzo1x_decode'
make: *** [libmpcodecs/native/nuppelvideo.o] Error 1

The problem is easy to fix.

LZO_OUTPUT_PADDING is actually AV_LZO_OUTPUT_PADDING. Or at least I think so.

How this code got into the tree? Don't you at least try to compile it?

I attach the patch.

I forgot - the tree still doesn't compile because after this fix it fails with:

gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I..
-I.. -Wundef -Wdisabled-optimization -Wdeclaration-after-statement
-std=gnu99 -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4
-march=pentium-m -mtune=pentium-m -pipe -ffast-math
-fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE -I.  -Ilibdvdread4
-I/usr/local/include/freetype2 -I/usr/local/include -Ilibdvdnav   -c
-o os_support.o os_support.c
In file included from os_support.c:42:
network.h:44:23: arpa/inet.h: No such file or directory
os_support.c: In function `ff_socket_nonblock':
os_support.c:80: warning: passing arg 3 of `ioctlsocket' from
incompatible pointer type
make[1]: *** [os_support.o] Error 1
make[1]: Leaving directory `D:/Programs/msys/devel/libavformat'
make: *** [libavformat/libavformat.a] Error 2

I honestly don't have time and energy to submit patch about it as well.
-------------- next part --------------
Index: libmpcodecs/native/nuppelvideo.c
===================================================================
--- libmpcodecs/native/nuppelvideo.c	(revision 28448)
+++ libmpcodecs/native/nuppelvideo.c	(working copy)
@@ -56,7 +56,7 @@
 		int in_len = encodedh->packetlength;
 #ifdef KEEP_BUFFER		
 		if (!previous_buffer) 
-			previous_buffer = ( unsigned char * ) malloc ( out_len + LZO_OUTPUT_PADDING );
+			previous_buffer = ( unsigned char * ) malloc ( out_len + AV_LZO_OUTPUT_PADDING );
 #endif
 
 		switch(encodedh->comptype)
@@ -69,7 +69,7 @@
 			break;
 		    case '2': /* RTJpeg with LZO */
 			if (!buffer) 
-			    buffer = ( unsigned char * ) malloc ( out_len + LZO_OUTPUT_PADDING );
+			    buffer = ( unsigned char * ) malloc ( out_len + AV_LZO_OUTPUT_PADDING );
 			if (!buffer)
 			{
 			    mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Nuppelvideo: error decompressing\n");


More information about the MPlayer-dev-eng mailing list