summaryrefslogtreecommitdiff
path: root/libavcodec/atrac3.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/atrac3.c
parent160ab30fcccea5697b2c065e7647c370e321cca6 (diff)
downloadffmpeg-aee481cebe8f95ce3789bdead6fb8ddfb142c37f.tar.gz
use av_clip_int16() where it makes sense
Originally committed as revision 10078 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/atrac3.c')
-rw-r--r--libavcodec/atrac3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 0b1400712b..e7239a3bab 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -895,13 +895,13 @@ static int atrac3_decode_frame(AVCodecContext *avctx,
if (q->channels == 1) {
/* mono */
for (i = 0; i<1024; i++)
- samples[i] = av_clip(round(q->outSamples[i]), -32768, 32767);
+ samples[i] = av_clip_int16(round(q->outSamples[i]));
*data_size = 1024 * sizeof(int16_t);
} else {
/* stereo */
for (i = 0; i < 1024; i++) {
- samples[i*2] = av_clip(round(q->outSamples[i]), -32768, 32767);
- samples[i*2+1] = av_clip(round(q->outSamples[1024+i]), -32768, 32767);
+ samples[i*2] = av_clip_int16(round(q->outSamples[i]));
+ samples[i*2+1] = av_clip_int16(round(q->outSamples[1024+i]));
}
*data_size = 2048 * sizeof(int16_t);
}