summaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegaudiodec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r--libavcodec/mpegaudiodec.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 3c4b757..d679b00 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;
}
OpenPOWER on IntegriCloud