use av_clip_int16() where it makes sense

Originally committed as revision 10078 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs
2007-08-11 22:48:55 +00:00
parent 160ab30fcc
commit aee481cebe
14 changed files with 34 additions and 64 deletions

View File

@@ -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;
}