summaryrefslogtreecommitdiff
path: root/libavcodec/wmadec.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/wmadec.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/wmadec.c')
-rw-r--r--libavcodec/wmadec.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index f828c789c7..01bd47f8e1 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -740,10 +740,7 @@ static int wma_decode_frame(WMACodecContext *s, int16_t *samples)
for(i=0;i<n;i++) {
a = lrintf(*iptr++);
- if (a > 32767)
- a = 32767;
- else if (a < -32768)
- a = -32768;
+ a = av_clip_int16(a);
*ptr = a;
ptr += incr;
}