[MPlayer-dev-eng] [PATCH] mencoder linking fails
Björn Sandell
biorn at dce.chalmers.se
Sun Jul 21 23:29:37 CEST 2002
Linking of mencoder fails (due to recent changes in libmpdemux?):
mencoder.o: Undefined symbol `_mp_decode_mp3_header' referenced from text
segment
The attached patch fixes it, though I'm not sure it's _the_ best way.
Björn Sandell DCE/DFS Sysadmin IT department
Chalmers University of Technology www.dce.chalmers.se
-------------- next part --------------
Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.140
diff -u -r1.140 mencoder.c
--- mencoder.c 12 Jul 2002 18:03:16 -0000 1.140
+++ mencoder.c 21 Jul 2002 21:06:36 -0000
@@ -49,6 +49,7 @@
#ifdef HAVE_MP3LAME
#undef CDECL
#include <lame/lame.h>
+#include "libmpdemux/mp3_hdr.h"
#endif
#ifdef HAVE_LIBCSS
$ more libmpdemux/mp3_hdr.h
int mp_get_mp3_header(unsigned char* hbuf,int* chans, int* freq);
#define mp_decode_mp3_header(hbuf) mp_get_mp3_header(hbuf,NULL,NULL)
static inline int mp_check_mp3_header(unsigned int head){
if( (head & 0x0000e0ff) != 0x0000e0ff ||
(head & 0x00fc0000) == 0x00fc0000) return 0;
if(mp_decode_mp3_header((unsigned char*)(&head))<=0) return 0;
return 1;
}
More information about the MPlayer-dev-eng
mailing list