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/liba52.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/liba52.c')
-rw-r--r-- | libavcodec/liba52.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavcodec/liba52.c b/libavcodec/liba52.c index 1fbed09d88..ce0f822d93 100644 --- a/libavcodec/liba52.c +++ b/libavcodec/liba52.c @@ -123,11 +123,7 @@ static int a52_decode_init(AVCodecContext *avctx) /**** 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) |