[Mplayer-cvslog] CVS: main/libmpcodecs ad_liba52.c,1.10,1.11

Arpi arpi at thot.banki.hu
Sat Sep 27 03:47:30 CEST 2003


Hi,

> Modified Files:
> 	ad_liba52.c 
> Log Message:
> fix for bigendian systems

fix what?
i didnt heard that ac3 was broken on bigendian...

> Index: ad_liba52.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_liba52.c,v
> retrieving revision 1.10
> retrieving revision 1.11
> diff -u -r1.10 -r1.11
> --- ad_liba52.c	17 May 2003 11:35:32 -0000	1.10
> +++ ad_liba52.c	26 Sep 2003 19:36:19 -0000	1.11
> @@ -48,7 +48,9 @@
>  	if(c<0) return -1; /* EOF*/
>          sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++]=c;
>      }
> +#ifndef WORDS_BIGENDIAN
>      if(sh_audio->format!=0x2000) swab(sh_audio->a_in_buffer,
> sh_audio->a_in_buffer,8);
> +#endif
>      length = a52_syncinfo (sh_audio->a_in_buffer, &flags, &sample_rate,
> &bit_rate);
>      if(length>=7 && length<=3840) break; /* we're done.*/
>      /* bad file => resync*/

also this fix is broken, so broken.
if it isnt a vlid header, and it has to read one more byte, the
header stuff will be swapped again, messing it all up.

insteda of swapping the header in the buffer, liba52 should be fixed,
to handle header parsing correctly on bigendian systems.
but again: imho it worked well, no fix needed.


A'rpi / Astral & ESP-team

--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu



More information about the MPlayer-cvslog mailing list