[vlc-commits] Auhal: remove unnecessary variables
Jean-Baptiste Kempf
git at videolan.org
Tue Aug 16 20:03:31 CEST 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Aug 12 18:18:32 2011 +0200| [6739e224d08d9dcf0b771d766d69c88cdeceaddc] | committer: Jean-Baptiste Kempf
Auhal: remove unnecessary variables
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6739e224d08d9dcf0b771d766d69c88cdeceaddc
---
modules/audio_output/auhal.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index 55aa49f..d3dfcc4 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -612,7 +612,6 @@ static int OpenSPDIF( audio_output_t * p_aout )
UInt32 i_param_size = 0, b_mix = 0;
Boolean b_writeable = false;
AudioStreamID *p_streams = NULL;
- UInt32 i_streams = 0;
/* Start doing the SPDIF setup proces */
p_sys->b_digital = true;
@@ -658,7 +657,6 @@ static int OpenSPDIF( audio_output_t * p_aout )
return false;
}
- i_streams = i_param_size / sizeof( AudioStreamID );
p_streams = (AudioStreamID *)malloc( i_param_size );
if( p_streams == NULL )
return false;
@@ -673,7 +671,7 @@ static int OpenSPDIF( audio_output_t * p_aout )
}
AudioObjectPropertyAddress physicalFormatsAddress = { kAudioStreamPropertyAvailablePhysicalFormats, kAudioObjectPropertyScopeGlobal, 0 };
- for( unsigned i = 0; i < i_streams && p_sys->i_stream_index < 0 ; i++ )
+ for( unsigned i = 0; i < i_param_size / sizeof( AudioStreamID ) && p_sys->i_stream_index < 0 ; i++ )
{
/* Find a stream with a cac3 stream */
AudioStreamRangedDescription *p_format_list = NULL;
@@ -1072,7 +1070,6 @@ static int AudioDeviceSupportsDigital( audio_output_t *p_aout, AudioDeviceID i_d
OSStatus err = noErr;
UInt32 i_param_size = 0;
AudioStreamID *p_streams = NULL;
- int i_streams = 0;
bool b_return = false;
/* Retrieve all the output streams */
@@ -1084,7 +1081,6 @@ static int AudioDeviceSupportsDigital( audio_output_t *p_aout, AudioDeviceID i_d
return false;
}
- i_streams = i_param_size / sizeof( AudioStreamID );
p_streams = (AudioStreamID *)malloc( i_param_size );
if( p_streams == NULL )
return VLC_ENOMEM;
@@ -1096,7 +1092,7 @@ static int AudioDeviceSupportsDigital( audio_output_t *p_aout, AudioDeviceID i_d
return false;
}
- for( int i = 0; i < i_streams; i++ )
+ for( unsigned i = 0; i < i_param_size / sizeof( AudioStreamID ); i++ )
{
if( AudioStreamSupportsDigital( p_aout, p_streams[i] ) )
b_return = true;
More information about the vlc-commits
mailing list