[MPlayer-advusers] Re: FAAD problem on AMD64: no sound

Daniel Hottinger mplayer at hotti.ch
Sun Apr 3 16:06:30 CEST 2005


Hi Diego

* On the 93th day of the year MMV a.d., Diego Biurrun wrote:
> On Sun, Apr 03, 2005 at 02:40:30PM +0200, Daniel Hottinger wrote:
> > The good news is that I've just figured out that the hack in the
> > external libfaad:
> > 
> > |    if (hDecoder->fr_channels == 6)
> > |        break;
> > (libfaad/syntax.c)
> > 
> > from a previous mail actually solved the problem completely! With
> > external libfaad and -channels 6 I get 3 different stereo streams
> > (front, rear, center/lfe). I must have been too tired that
> > evening to play with -channels and swap the surround slot...
> 
> Could you make a patch out of this?  If it fixes AMD64 while not
> breaking i386 and PPC I will most likely apply it.

I've attached it. The patch is against the CVS snapshot of
libfaad and fixes the broken sound for

/incoming/zx.eva.renewal.01.divx511_first_5mb_amd64.mkv

on i386 and amd64 when using external libfaad. It's a hack and
certainly breaks real 7 or 8 channel files (but I do not have
such files here).

> > -- 
> > I was trained in the culture of mathematics, so I'm not used to charging 
> > people a penny every time they use a theorem I proved. But I charge somebody 
> > for the time I spend telling them which theorem to apply.  -- D.E. Knuth
> 
> Nice quote, BTW.

Thanks ;-)

Hotti
-------------- next part --------------
diff -purN faad2-15092004.orig/libfaad/syntax.c faad2-15092004/libfaad/syntax.c
--- faad2-15092004.orig/libfaad/syntax.c	2004-09-04 16:56:30.000000000 +0200
+++ faad2-15092004/libfaad/syntax.c	2005-04-03 15:09:13.971359854 +0200
@@ -427,6 +427,13 @@ void raw_data_block(NeAACDecHandle hDeco
         while ((id_syn_ele = (uint8_t)faad_getbits(ld, LEN_SE_ID
             DEBUGVAR(1,4,"NeAACDecDecode(): id_syn_ele"))) != ID_END)
         {
+	    /* FIXME
+	     * Hack, fixes issue with 6 channel AAC files where 
+	     * 8 channels are decoded
+	     */
+	    if (hDecoder->fr_channels == 6)
+		break;
+
             switch (id_syn_ele) {
             case ID_SCE:
                 if (hDecoder->first_syn_ele == 25) hDecoder->first_syn_ele = id_syn_ele;


More information about the MPlayer-advusers mailing list