From aee481cebe8f95ce3789bdead6fb8ddfb142c37f Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Sat, 11 Aug 2007 22:48:55 +0000 Subject: use av_clip_int16() where it makes sense Originally committed as revision 10078 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/libvorbis.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavcodec/libvorbis.c') diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c index 5d40e91b52..faaceb0ba7 100644 --- a/libavcodec/libvorbis.c +++ b/libavcodec/libvorbis.c @@ -307,8 +307,7 @@ static inline int conv(int samples, float **pcm, char *buf, int channels) { val = mono[j] * 32767.f; - if(val > 32767) val = 32767 ; - if(val < -32768) val = -32768 ; + val = av_clip_int16(val); *ptr = val ; ptr += channels; -- cgit v1.2.3