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

Felix Buenemann atmosfear at users.sourceforge.net
Fri Feb 7 01:10:58 CET 2003


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

-- 
Best Regards,
        Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________



More information about the MPlayer-dev-eng mailing list