Commit 1f8490d6 authored by Laurent Aimar's avatar Laurent Aimar

Allow up to 8 channels with ffmpeg decoder.

parent d82497f9
...@@ -44,17 +44,23 @@ ...@@ -44,17 +44,23 @@
#include "avcodec.h" #include "avcodec.h"
static const unsigned int pi_channels_maps[7] = static const unsigned int pi_channels_maps[9] =
{ {
0, 0,
AOUT_CHAN_CENTER, AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT, AOUT_CHAN_CENTER,
AOUT_CHAN_CENTER | AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT, AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_REARLEFT AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER,
| AOUT_CHAN_REARRIGHT, AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | 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_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_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT |
AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER |
AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT |
AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | AOUT_CHAN_LFE,
}; };
/***************************************************************************** /*****************************************************************************
...@@ -321,7 +327,7 @@ aout_buffer_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block ) ...@@ -321,7 +327,7 @@ aout_buffer_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
p_block->i_buffer -= i_used; p_block->i_buffer -= i_used;
p_block->p_buffer += i_used; p_block->p_buffer += i_used;
if( p_sys->p_context->channels <= 0 || p_sys->p_context->channels > 6 || if( p_sys->p_context->channels <= 0 || p_sys->p_context->channels > 8 ||
p_sys->p_context->sample_rate <= 0 ) p_sys->p_context->sample_rate <= 0 )
{ {
msg_Warn( p_dec, "invalid audio properties channels count %d, sample rate %d", msg_Warn( p_dec, "invalid audio properties channels count %d, sample rate %d",
......
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