[MPlayer-users] Re: unable to compile

Darryl Millette dmillette at fastmail.fm
Sun Apr 13 02:26:20 CEST 2003


Hello Mike (and any MPlayer developers who are also reading),

> my problem is compilation. i configure it with --enable-qtx-codecs but 
> when I try to  run make, it ends with error 1, being "Too few arguments 
> to function 'faacDecInit'" in function 'init', "Too few arguments to 
> function 'faacDecDecode'" in function "decode_audio" on lines 173 and 
> 198. i can't compile due to this. any ideas?

I am using RH8.0 with a 2.4.19 kernel.

I ran into this problem last night (also with MPlayer 0.90) but was able to 
work around it, while keeping faad enabled.

As far as I can tell, the "#if (FAADVERSION <= 11)" statements in 
"MPlayer-0.90/libmpcodecs/ad_faad.c" do not work properly for the latest CVS 
versions of the FAAD library.  These statements check the version of FAAD 
that is installed to determine how to call the faacDecInit function in FAAD.

The version of the FAAD library on my system, according to the "#define 
FAAD2_VERSION" statement in my "/usr/local/include/faad.h" file, is "1.2 
beta".  Yet, for some reason, the "#if (FAADVERSION <= 11)" seems to think 
that I'm using a version that is less than "11" and is calling the 
faacDecInit function without including the buffer length ("buflen").

Since I didn't have much time to try to do a decent fix and it's been a long 
while since I programmed in C, I made a quick kludge solution so that it 
would compile.  My completely nonideal :-) fix was to comment out the older 
faacDecInit function calls and the "#if ... #else" statements that were 
causing the problems.

The offending "#if" statements are located in the 
MPlayer-0.90/libmpcodecs/ad_faad.c file at lines 88, 172, and 197.  The "/*" 
and "*/" were added by me.  This is in relation to the archived posting at 
http://mplayerhq.hu/pipermail/mplayer-dev-eng/2003-February/015697.html.

At lines 88 and following:
/* #if (FAADVERSION <= 11)
    faac_init = faacDecInit(faac_hdec, sh->a_in_buffer,
       &faac_samplerate, &faac_channels);
#else */
    faac_init = faacDecInit(faac_hdec, sh->a_in_buffer,
       sh->a_in_buffer_len, &faac_samplerate, &faac_channels);
/* #endif */

Lines 172 and following:
/* #if (FAADVERSION <= 11)
    faac_sample_buffer = faacDecDecode(faac_hdec, &faac_finfo, 
sh->a_in_buffer+j);
#else */
    faac_sample_buffer = faacDecDecode(faac_hdec, &faac_finfo, 
sh->a_in_buffer+j, sh->a_in_buffer_len);
/* #endif */

Lines 197 and following:
/* #if (FAADVERSION <= 11)
    faac_sample_buffer = faacDecDecode(faac_hdec, &faac_finfo, bufptr);
#else */
    faac_sample_buffer = faacDecDecode(faac_hdec, &faac_finfo, bufptr, 
buflen);
/* #endif */


I hope this helps somewhat and that someone better versed in C will be able to 
figure out a better solution.  It compiled fine for me once I did this, 
although, curiously, I had to make a symlink from 
"/usr/local/lib/libfaad.so.0" to "/usr/lib/libfaad.so.0" to get MPlayer to 
run even though ./configure seemed to have found the library in 
/usr/local/lib.  However, since that, MPlayer's been working very very well 
for me.  Kudos to the development team!! :-)

Regards,

Darryl



More information about the MPlayer-users mailing list