Mercurial > libavcodec.hg
diff liba52.c @ 5523:c2ab2ac31edb libavcodec
use av_clip_int16() where it makes sense
author | aurel |
---|---|
date | Sat, 11 Aug 2007 22:48:55 +0000 |
parents | 4323e587708d |
children | bc4791868c52 |
line wrap: on
line diff
--- a/liba52.c Fri Aug 10 19:28:28 2007 +0000 +++ b/liba52.c Sat Aug 11 22:48:55 2007 +0000 @@ -123,11 +123,7 @@ /**** the following two functions comes from a52dec */ static inline int blah (int32_t i) { - if (i > 0x43c07fff) - return 32767; - else if (i < 0x43bf8000) - return -32768; - return i - 0x43c00000; + return av_clip_int16(i - 0x43c00000); } static inline void float_to_int (float * _f, int16_t * s16, int nchannels)