[vlc-commits] Simple Simplification - part 1
Jean-Baptiste Kempf
git at videolan.org
Tue Apr 9 16:34:43 CEST 2013
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Jan 26 00:55:54 2013 +0100| [bbbec2d42e913a9ae1a0356e2054db5ef8ec9d70] | committer: Jean-Baptiste Kempf
Simple Simplification - part 1
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bbbec2d42e913a9ae1a0356e2054db5ef8ec9d70
---
modules/audio_filter/channel_mixer/simple.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/modules/audio_filter/channel_mixer/simple.c b/modules/audio_filter/channel_mixer/simple.c
index 00d538a..6e70b63 100644
--- a/modules/audio_filter/channel_mixer/simple.c
+++ b/modules/audio_filter/channel_mixer/simple.c
@@ -72,14 +72,10 @@ static void DoWork( filter_t * p_filter,
const bool b_input_3_0 = !b_input_7_0 && !b_input_5_0 && !b_input_4_center_rear &&
(i_input_physical & ~AOUT_CHAN_LFE) == AOUT_CHANS_3_0;
- int i_input_nb = aout_FormatNbChannels( &p_filter->fmt_in.audio );
- int i_output_nb = aout_FormatNbChannels( &p_filter->fmt_out.audio );
- float *p_dest = (float *)p_out_buf->p_buffer;
- const float *p_src = (const float *)p_in_buf->p_buffer;
int i;
- p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
- p_out_buf->i_buffer = p_in_buf->i_buffer * i_output_nb / i_input_nb;
+ float *p_dest = (float *)p_out_buf->p_buffer;
+ const float *p_src = (const float *)p_in_buf->p_buffer;
if( p_filter->fmt_out.audio.i_physical_channels == AOUT_CHANS_2_0 )
{
@@ -260,6 +256,11 @@ static block_t *Filter( filter_t *p_filter, block_t *p_block )
p_out->i_pts = p_block->i_pts;
p_out->i_length = p_block->i_length;
+ int i_input_nb = aout_FormatNbChannels( &p_filter->fmt_in.audio );
+ int i_output_nb = aout_FormatNbChannels( &p_filter->fmt_out.audio );
+ p_out->i_nb_samples = p_block->i_nb_samples;
+ p_out->i_buffer = p_block->i_buffer * i_output_nb / i_input_nb;
+
DoWork( p_filter, p_block, p_out );
block_Release( p_block );
More information about the vlc-commits
mailing list