[MPlayer-dev-eng] [PATCH] latm faad handling

Dan Oscarsson Dan.Oscarsson at tieto.com
Fri Jun 18 11:03:54 CEST 2010


tor 2010-06-17 klockan 22:05 +0200 skrev Reimar Döffinger:
> On Wed, Jun 16, 2010 at 09:14:05PM +0200, Dan Oscarsson wrote:
> > +    if (faac_init < 0 && sh->format == mmioFOURCC('M', 'P', '4', 'L')) {
> > +        // working LATM not found at first try, look further on in stream
> > +        for (int i = 0; i < 5; i++) {
> 
> Move the "int" out, this will not work with some older compilers.
> 
> > +            pos = sh->a_in_buffer_len-3;
> 
> This can overflow (or rather underfflow).
> 
> > +            memmove(sh->a_in_buffer, &(sh->a_in_buffer[pos]), 3);
> 
> Pointless ().
> 

> 
> I guess this can be applied already given that Nico seems ok with it.
> Though those IS_.. macros are getting really unyieldly.

OK. Do you want me to fix the small things above or can the committer
fix them?
The underflow fix could be fixed in the for statement above like:

for (i = 0; i < 5 && sh->a_in_buffer_len >= 3; i++) {

   Dan




More information about the MPlayer-dev-eng mailing list