Commit 4414a1a3 authored by Francois Cartegnie's avatar Francois Cartegnie

codec: lpcm: fix multi groups reading

p_out need to increment after all groups.
refs DVD-A_6ChannelID_16bit48000Hz2group6ch.AOB
parent 43862ea8
...@@ -1137,6 +1137,8 @@ static void AobExtract( block_t *p_aout_buffer, ...@@ -1137,6 +1137,8 @@ static void AobExtract( block_t *p_aout_buffer,
while( p_block->i_buffer > 0 ) while( p_block->i_buffer > 0 )
{ {
unsigned int i_aout_written = 0;
for( int i = 0; i < 2; i++ ) for( int i = 0; i < 2; i++ )
{ {
const aob_group_t *g = &p_group[1-i]; const aob_group_t *g = &p_group[1-i];
...@@ -1151,7 +1153,6 @@ static void AobExtract( block_t *p_aout_buffer, ...@@ -1151,7 +1153,6 @@ static void AobExtract( block_t *p_aout_buffer,
if( !g->i_bits ) if( !g->i_bits )
continue; continue;
unsigned int i_aout_written = 0;
for( unsigned n = 0; n < 2; n++ ) for( unsigned n = 0; n < 2; n++ )
{ {
for( unsigned j = 0; j < g->i_channels; j++ ) for( unsigned j = 0; j < g->i_channels; j++ )
...@@ -1210,11 +1211,10 @@ static void AobExtract( block_t *p_aout_buffer, ...@@ -1210,11 +1211,10 @@ static void AobExtract( block_t *p_aout_buffer,
} }
/* */ /* */
p_out += i_aout_written;
p_block->i_buffer -= i_group_size; p_block->i_buffer -= i_group_size;
p_block->p_buffer += i_group_size; p_block->p_buffer += i_group_size;
} }
p_out += i_aout_written;
} }
} }
static void BdExtract( block_t *p_aout_buffer, block_t *p_block, static void BdExtract( block_t *p_aout_buffer, block_t *p_block,
......
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