diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2007-08-11 22:48:55 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2007-08-11 22:48:55 +0000 |
commit | aee481cebe8f95ce3789bdead6fb8ddfb142c37f (patch) | |
tree | baa5eb5fc18cea91d0a68918b12b233910c902ca /libavcodec/mpegaudiodec.c | |
parent | 160ab30fcccea5697b2c065e7647c370e321cca6 (diff) | |
download | ffmpeg-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/mpegaudiodec.c')
-rw-r--r-- | libavcodec/mpegaudiodec.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 3c4b757d6a..d679b006be 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -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; } |