[MPlayer-dev-eng] [PATCH] bigendian fix for hwac3

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Sep 15 17:17:11 CEST 2007


Hello,
On Sat, Sep 15, 2007 at 06:04:14PM +0800, Ulion wrote:
>      buf16[0] = 0xF872;   // iec 61937 syncword 1
>      buf16[1] = 0x4E1F;   // iec 61937 syncword 2
>      buf16[2] = 0x0001;   // data-type ac3
> +    buf16[2] |= (uint16_t)(sh_audio->a_in_buffer[5] & 0x7) << 8; // bsmod

I forgot, this also misses a check for len >= 6. Even though it won't
produce a playable frame anyway if this isn't the case, it still seems
advisable for "cosmetic" reasons (I guess that even without this check
it can't really crash, a_in_buffer is probably always large enough)...

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list