[MPlayer-dev-eng] [PATCH] libmpcodecs/ad_faad.c compile fix

Andre Schulz andre at 0wnage.de
Fri Feb 7 20:22:18 CET 2003


Felix Buenemann wrote:
> On Tuesday 04 February 2003 21:36, Andre Schulz wrote:
> 
>>Björn Sandell wrote:
>>
>>>On Tue, 04 Feb 2003 00:10:10 +0100
>>>
>>>Andre Schulz <andre at 0wnage.de> wrote:
>>>
>>>>I tried to compile mplayer with the faad2-1.1 library and it choked.
>>>>It turned out that the faacDecInit() and faacDecDecode() functions were
>>>>just missing 1 argument. (the buffer length)
>>>
>>>Err, something dosen't add up here. From my faad.h
>>>
>>>#define FAAD2_VERSION "1.1"
>>>
>>>long FAADAPI faacDecInit(faacDecHandle hDecoder,
>>>                        unsigned char *buffer,
>>>                        unsigned long *samplerate,
>>>                        unsigned char *channels);
>>>
>>>void* FAADAPI faacDecDecode(faacDecHandle hDecoder,
>>>                            faacDecFrameInfo *hInfo,
>>>                            unsigned char *buffer);
>>>
>>>Have been using it for three months.
>>
>>Oops. Sorry.
>>You're right.
>>I had both faad2-1.1 and cvs sources but installed the latter. :|
>>The #define for the cvs version is: "1.2 beta"
>>
>>Arpi: I don't know if you still would like a patch for this.
>>Anyway, I have hacked together a updated version which is attached to
>>this mail.
>>
>>Btw maybe I don't have enough experience in C but parsing the
>>FAAD2_VERSION define into something usable is a pain in the ass.
> 
> yea, the define sux, would be much nicer as sheer number.
> 
> Btw. patch looks OK to me, though I haven't yet tested it as I've got no faad 
> currently installed (and no time before next week).
> But one thing, current configure code is pretty bloated, what you think about 
> just outputting FAAD2_VERSION from simplistic C prog and then piping it 
> through sed, sth. along the lines of:
> 
> $_faadver = `"$TMPO" | sed -e 's/^\([0-9]\+\)\.\([0-9]\+\).*/\1\2/'`
> 
> This takes eg "1.3 beta schwubbeldiwupp" and spits out "13"... btw. did I 
> mention sed regex sux compared to perl regex :)
> 
> Arpi, could you test the code portion of the patch? I won't have time to 
> install libfaad until next week.
> 
> 
>>Andre
> 
> 

Thanks for the advice Felix.
I also unindented the C preprocessor commands I added in 
libmpcodecs/ad_faad.c.
The updated patch is attached to this email.

Andre

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: MPlayer-20030207-faad2.patch
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030207/ae697899/attachment.txt>


More information about the MPlayer-dev-eng mailing list