Commit 86352fc8 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Fix FLAC 7.1 support

Close #3348
parent f74eff7d
...@@ -64,7 +64,7 @@ struct decoder_sys_t ...@@ -64,7 +64,7 @@ struct decoder_sys_t
bool b_stream_info; bool b_stream_info;
}; };
static const int pi_channels_maps[7] = static const int pi_channels_maps[9] =
{ {
0, 0,
AOUT_CHAN_CENTER, AOUT_CHAN_CENTER,
...@@ -75,7 +75,13 @@ static const int pi_channels_maps[7] = ...@@ -75,7 +75,13 @@ static const int pi_channels_maps[7] =
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
| AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT, | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
| AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | AOUT_CHAN_LFE | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | AOUT_CHAN_LFE,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
| AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | AOUT_CHAN_MIDDLELEFT
| AOUT_CHAN_MIDDLERIGHT,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER | AOUT_CHAN_REARLEFT
| AOUT_CHAN_REARRIGHT | AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT
| AOUT_CHAN_LFE
}; };
/***************************************************************************** /*****************************************************************************
...@@ -334,8 +340,8 @@ DecoderWriteCallback( const FLAC__StreamDecoder *decoder, ...@@ -334,8 +340,8 @@ DecoderWriteCallback( const FLAC__StreamDecoder *decoder,
{ 0, 1, 3, 4, 2 }, { 0, 1, 3, 4, 2 },
{ 0, 1, 4, 5, 2, 3 }, { 0, 1, 4, 5, 2, 3 },
{ 0, 1, 6, 2, 3, 4, 5 }, /* 7.0 Unspecified by flac */ { 0, 1, 6, 4, 5, 2, 3 }, /* 7.0 Unspecified by flac, but following SMPTE */
{ 0, 1, 6, 7, 2, 3, 4, 5 }, /* 7.1 Unspecified by flac */ { 0, 1, 6, 7, 4, 5, 2, 3 }, /* 7.1 Unspecified by flac, but following SMPTE */
}; };
VLC_UNUSED(decoder); VLC_UNUSED(decoder);
......
...@@ -206,7 +206,7 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block ) ...@@ -206,7 +206,7 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
if( !p_sys->b_stream_info ) if( !p_sys->b_stream_info )
ProcessHeader( p_dec ); ProcessHeader( p_dec );
if( p_sys->stream_info.channels > 6 ) if( p_sys->stream_info.channels > 8 )
{ {
msg_Err( p_dec, "This stream uses too many audio channels" ); msg_Err( p_dec, "This stream uses too many audio channels" );
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment