summaryrefslogtreecommitdiff
path: root/libavcodec/resample2.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2007-08-11 22:48:55 +0000
committerAurelien Jacobs <aurel@gnuage.org>2007-08-11 22:48:55 +0000
commitaee481cebe8f95ce3789bdead6fb8ddfb142c37f (patch)
treebaa5eb5fc18cea91d0a68918b12b233910c902ca /libavcodec/resample2.c
parent160ab30fcccea5697b2c065e7647c370e321cca6 (diff)
use av_clip_int16() where it makes sense
Originally committed as revision 10078 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/resample2.c')
-rw-r--r--libavcodec/resample2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/resample2.c b/libavcodec/resample2.c
index ffd6fc71c6..da1443d98f 100644
--- a/libavcodec/resample2.c
+++ b/libavcodec/resample2.c
@@ -279,7 +279,7 @@ int av_resample(AVResampleContext *c, short *dst, short *src, int *consumed, int
}
#ifdef CONFIG_RESAMPLE_AUDIOPHILE_KIDDY_MODE
- dst[dst_index] = av_clip(lrintf(val), -32768, 32767);
+ dst[dst_index] = av_clip_int16(lrintf(val));
#else
val = (val + (1<<(FILTER_SHIFT-1)))>>FILTER_SHIFT;
dst[dst_index] = (unsigned)(val + 32768) > 65535 ? (val>>31) ^ 32767 : val;