[vlc-commits] codec: lpcm: reorder channels only after decoding (fix #14114)
Francois Cartegnie
git at videolan.org
Mon Mar 9 17:13:28 CET 2015
vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Mar 9 17:00:15 2015 +0100| [844b5f3ba7ad1939d5a2c1bb1ec2f1727c2e03f5] | committer: Jean-Baptiste Kempf
codec: lpcm: reorder channels only after decoding (fix #14114)
24bit LPCM is packed and can't be reordered without introducing
clipping issues.
(cherry picked from commit ab727f94736c1e34ee75d920689621e72ae080c9)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=844b5f3ba7ad1939d5a2c1bb1ec2f1727c2e03f5
---
modules/codec/lpcm.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules/codec/lpcm.c b/modules/codec/lpcm.c
index e3dad87..e040133 100644
--- a/modules/codec/lpcm.c
+++ b/modules/codec/lpcm.c
@@ -434,13 +434,6 @@ static block_t *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
p_block->p_buffer += p_sys->i_header_size + i_padding;
p_block->i_buffer -= p_sys->i_header_size + i_padding;
- if( p_sys->i_chans_to_reorder )
- {
- aout_ChannelReorder( p_block->p_buffer, p_block->i_buffer,
- p_sys->i_chans_to_reorder, p_sys->pi_chan_table,
- p_dec->fmt_out.i_codec );
- }
-
switch( p_sys->i_type )
{
case LPCM_WIDI:
@@ -457,6 +450,13 @@ static block_t *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
break;
}
+ if( p_sys->i_chans_to_reorder )
+ {
+ aout_ChannelReorder( p_aout_buffer->p_buffer, p_aout_buffer->i_buffer,
+ p_sys->i_chans_to_reorder, p_sys->pi_chan_table,
+ p_dec->fmt_out.i_codec );
+ }
+
block_Release( p_block );
return p_aout_buffer;
}
More information about the vlc-commits
mailing list