aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/sonic.c
diff options
context:
space:
mode:
authorAurelien Jacobs2007-08-11 22:48:55 +0000
committerAurelien Jacobs2007-08-11 22:48:55 +0000
commitaee481cebe8f95ce3789bdead6fb8ddfb142c37f (patch)
treebaa5eb5fc18cea91d0a68918b12b233910c902ca /libavcodec/sonic.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/sonic.c')
-rw-r--r--libavcodec/sonic.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index f3388589b6..bff21eb8d2 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -926,14 +926,7 @@ static int sonic_decode_frame(AVCodecContext *avctx,
// internal -> short
for (i = 0; i < s->frame_size; i++)
- {
- if (s->int_samples[i] > 32767)
- samples[i] = 32767;
- else if (s->int_samples[i] < -32768)
- samples[i] = -32768;
- else
- samples[i] = s->int_samples[i];
- }
+ samples[i] = av_clip_int16(s->int_samples[i]);
align_get_bits(&gb);