[MPlayer-dev-eng] Re: [PATCH] hwac3 on FreeBSD

Anssi Saari as at sci.fi
Sun Sep 15 17:05:53 CEST 2002


On Sat, Sep 14, 2002 at 12:35:56PM +0200, Arpi wrote:
> Hi,
> 
> > +#ifdef __FreeBSD__
> > +	if(len > -1)
> > +#endif
> >  	swab(sh_audio->a_in_buffer, buf + 8, len);
> 
> maybe if(len>0) is better :)
> and it can be there any time, not only for freebsd

Seems reasonable :)

Here's a new diff, please apply:

--- libmpcodecs/ad_hwac3.c.orig	Sun Sep 15 12:29:51 2002
+++ libmpcodecs/ad_hwac3.c	Sun Sep 15 12:48:35 2002
@@ -96,7 +96,8 @@
 	buf[5] = 0x00;
 	buf[6] = (len << 3) & 0xFF;
 	buf[7] = (len >> 5) & 0xFF;
-	swab(sh_audio->a_in_buffer, buf + 8, len);
+	if(len>0)
+		swab(sh_audio->a_in_buffer, buf + 8, len);
 	//memcpy(buf + 8, sh_audio->a_in_buffer, len);
 	memset(buf + 8 + len, 0, 6144 - 8 - len);
 



More information about the MPlayer-dev-eng mailing list