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

@@ -822,10 +822,7 @@ void ff_mpa_synth_filter(MPA_INT *synth_buf_ptr, int *synth_buf_offset,
#if FRAC_BITS <= 15
/* NOTE: can cause a loss in precision if very high amplitude
sound */
if (v > 32767)
v = 32767;
else if (v < -32768)
v = -32768;
v = av_clip_int16(v);
#endif
synth_buf[j] = v;
}