[MPlayer-dev-eng] [PATCH] #define __BSD_VISIBLE to 1

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Feb 16 20:13:01 CET 2014


On Sun, Feb 16, 2014 at 08:09:17PM +0100, Alexander Strasser wrote:
> On 2014-02-16 18:38 +0100, Reimar Döffinger wrote:
> > On Sun, Feb 16, 2014 at 06:16:14PM +0100, Alexander Strasser wrote:
> > > +static void swap_bytes(uint8_t * buf, int size)
> > > +{
> > > +   uint16_t * p = (uint16_t *)buf;
> > > +   size -= size & 1;
> > > +   while (size > 0) {
> > > +     *p = bswap_16(*p);
> > > +     ++p;
> > > +     size -= 2;
> > > +   }
> > 
> > While that matches what swab does, I am not sure the odd size handling
> > is actually correct for dnet.
> 
>   What should I do if the size is odd then?

Well, other AC3 code behaves as if there was an additional 0.
However it makes things a bit messy since you need to assume that the
extra byte always fits or do some really ugly changes.
So it might be best to leave it as is, but I just wanted to mention
it that we have a few different implementations there.


More information about the MPlayer-dev-eng mailing list