[MPlayer-dev-eng] [PATCH] add support for AC3 endianness

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Nov 15 12:29:00 CET 2007


Hello,
On Mon, Sep 17, 2007 at 09:18:07AM +0800, Ulion wrote:
[...]
> > --- libao2/ao_alsa.c
> > @@ -539,6 +536,9 @@
> >           mp_msg(MSGT_AO,MSGL_INFO,
> >                 MSGTR_AO_ALSA_FormatNotSupportedByHardware, af_fmt2str_short(format));
> >           alsa_format = SND_PCM_FORMAT_S16_LE;
> > +         if (AF_FORMAT_IS_AC3(ao_data.format))
> > +           ao_data.format = AF_FORMAT_AC3_LE;
> > +         else          ao_data.format = AF_FORMAT_S16_LE;
> >        }
> 
> I do known alsa also support AC3_BE for some card on some platform, so
> set ao_data.format to AF_FORMAT_AC3_LE is not correctly.

Are there cards that _only_ support AC3_BE though?

> The behavior should be: No matter what byte-order input ac3 stream is
> using, if the test failed, try change the endian and continue. So
> maybe this is better if it not cause a dead loop.

This is exactly the behaviour it uses for other audio formats, there is
simply one and only one fallback, AF_FORMAT_S16_LE.
IMO those should be fixed properly at some other time.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list