-/****************************************************************************
- * SyncInfo: parse A52 sync info
- ****************************************************************************
- * This code is borrowed from liba52 by Aaron Holtzman & Michel Lespinasse,
- * since we don't want to oblige S/PDIF people to use liba52 just to get
- * their SyncInfo...
- ****************************************************************************/
-int SyncInfo( const byte_t * p_buf, int * pi_channels, int * pi_sample_rate,
- int * pi_bit_rate)
-{
- static const u8 halfrate[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3};
- static const int rate[] = { 32, 40, 48, 56, 64, 80, 96, 112,
- 128, 160, 192, 224, 256, 320, 384, 448,
- 512, 576, 640};
- static const u8 lfeon[8] = {0x10, 0x10, 0x04, 0x04, 0x04, 0x01, 0x04, 0x01};
- int frmsizecod;
- int bitrate;
- int half;
- int acmod;
-
- if ((p_buf[0] != 0x0b) || (p_buf[1] != 0x77)) /* syncword */
- return 0;
-
- if (p_buf[5] >= 0x60) /* bsid >= 12 */
- return 0;
- half = halfrate[p_buf[5] >> 3];
-
- /* acmod, dsurmod and lfeon */
- acmod = p_buf[6] >> 5;
- if ( p_buf[6] & 0xf8 )
+ p_dec->fmt_out.audio.i_original_channels = p_sys->frame.i_channels_conf;
+ p_dec->fmt_out.audio.i_physical_channels =
+ p_sys->frame.i_channels_conf & AOUT_CHAN_PHYSMASK;
+
+ p_dec->fmt_out.i_bitrate = p_sys->frame.i_bitrate;
+
+ if( p_sys->b_packetizer )