diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2007-08-12 03:17:03 +0400 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2007-08-12 03:17:03 +0400 |
commit | 295f37379269e2df0e8983fbe89787ef1f49dc93 (patch) | |
tree | 917a4d87f90782008ce0de378f34cbbc623604c0 /libavcodec/libvorbis.c | |
parent | b0f3382873d275c4bd2e04f6f4f74f75162e5325 (diff) |
various simplifications around recent av_clip_int16() usage
Originally committed as revision 10080 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/libvorbis.c')
-rw-r--r-- | libavcodec/libvorbis.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c index faaceb0ba7..5c78d2004b 100644 --- a/libavcodec/libvorbis.c +++ b/libavcodec/libvorbis.c @@ -295,7 +295,7 @@ static int oggvorbis_decode_init(AVCodecContext *avccontext) { static inline int conv(int samples, float **pcm, char *buf, int channels) { - int i, j, val ; + int i, j; ogg_int16_t *ptr, *data = (ogg_int16_t*)buf ; float *mono ; @@ -304,12 +304,7 @@ static inline int conv(int samples, float **pcm, char *buf, int channels) { mono = pcm[i] ; for(j = 0 ; j < samples ; j++) { - - val = mono[j] * 32767.f; - - val = av_clip_int16(val); - - *ptr = val ; + *ptr = av_clip_int16(mono[j] * 32767.f); ptr += channels; } } |