[vlc-devel] [PATCH 1/2] audiotrack: use VLC_CLIP
Thomas Guillem
thomas at gllm.fr
Tue Mar 10 15:59:40 CET 2015
---
modules/audio_output/audiotrack.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index af4df7f..45b1674 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -614,10 +614,7 @@ JNIThread_Configure( JNIEnv *env, audio_output_t *p_aout )
audio_sample_format_t fmt = p_sys->fmt;
/* 4000 <= frequency <= 48000 */
- if( fmt.i_rate < 4000 )
- fmt.i_rate = 4000;
- if( fmt.i_rate > 48000 )
- fmt.i_rate = 48000;
+ fmt.i_rate = VLC_CLIP( fmt.i_rate, 4000, 48000 );
/* We can only accept U8, S16N, FL32 */
switch( fmt.i_format )
--
2.1.3
More information about the vlc-devel
mailing list