[MPlayer-dev-eng] Mencoder fails to compile if lame is missing

Anders Johansson ajh at watri.uwa.edu.au
Sun Oct 6 09:22:55 CEST 2002


gcc -c -O4 -march=i686 -mcpu=i686 -pipe -ffast-math
-fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -Ilibmpdemux -Iloader -Ilibvo
-I/usr/include/SDL -D_REENTRANT  -o mencoder.o mencoder.c
mencoder.c: In function `main':
mencoder.c:727: `lame_param_mode' undeclared (first use in this function)
mencoder.c:727: (Each undeclared identifier is reported only once
mencoder.c:727: for each function it appears in.)
make: *** [mencoder.o] Error 1


Possible fix:



--- ../main.dev/mencoder.c      Sun Oct  6 15:20:02 2002
+++ ./mencoder.c        Sun Oct  6 15:17:41 2002
@@ -724,8 +724,12 @@
     if(sizeof(MPEGLAYER3WAVEFORMAT)!=30) mp_msg(MSGT_MENCODER,MSGL_WARN,"sizeof(MPEGLAYER3WAVEFORMAT)==%d!=30, maybe broken C compiler?\n",sizeof(MPEGLAYER3WAVEFORMAT));
     mux_a->wf=malloc(sizeof(MPEGLAYER3WAVEFORMAT)); // should be 30
     mux_a->wf->wFormatTag=0x55; // MP3
+#ifdef HAVE_MP3LAME 
     mux_a->wf->nChannels= (lame_param_mode<0) ? sh_audio->channels :
        ((lame_param_mode==3) ? 1 : 2);
+#else
+    mux_a->wf->nChannels=sh_audio->channels?sh_audio->channels:2;
+#endif
     mux_a->wf->nSamplesPerSec=mux_a->h.dwRate;
     mux_a->wf->nAvgBytesPerSec=192000/8; // FIXME!
     mux_a->wf->nBlockAlign=(mux_a->h.dwRate<32000)?576:1152; //
     required for l3codeca.acm + WMP 6.4



//Anders





More information about the MPlayer-dev-eng mailing list