[MPlayer-dev-eng] New audio filter layer finished

Anders Johansson ajh at watri.uwa.edu.au
Fri Oct 4 10:57:05 CEST 2002


Hi,

> Hi,
> 
> > > > that af_inputlen() is buggy anyway, it gives me a number, but if i request
> > > > decoding of that number of bytes, i'll get few percent (hundreds bytes!)
> > > > bigger output than requested, causing data loss sometimes :(
> > > 
> > > Sht I must have been brain damaged when I wrote that code.
> > > I have tried to fix it have a look there are some comments about usage
> > > added.
> > > 
> > 
> > And now I have fixed the bugs I introduced. I am going to wear out the
> > CVS before this works :(
> 
> hmm. still bad, now nearly always underestimate the buffer size :(
> yes i know it isn't always possible toget the right size due to various
> rounding.
> 
> it works well, but after most call it produces 4 bytes less then wanted, so
> it's called again with minsize=4... 
> 
> so i have a better idea:
> could you make/add a function to af.c core to calculate the number of input
> bytes, with 2 extra constraint:
> max_insize == maximum possible input block length (in. buffer size)
> max_outsize == maximum possible output block length (out buffer space)
> 
> so, something like this:
> int af_calc_insize_constrained(int wanted_outsize,int max_outsize,int max_insize);

Sure shouldn't be a problem, I am a bit short on time at the moment
though so I won't be able to do it until the Sunday or Monday. If my
wife let me off the hook I might be able to do it tomorrow.


> A'rpi / Astral & ESP-team
> 

//Anders




More information about the MPlayer-dev-eng mailing list