From 295f37379269e2df0e8983fbe89787ef1f49dc93 Mon Sep 17 00:00:00 2001
From: Aurelien Jacobs <aurel@gnuage.org>
Date: Sat, 11 Aug 2007 23:17:03 +0000
Subject: various simplifications around recent av_clip_int16() usage

Originally committed as revision 10080 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/libvorbis.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

(limited to 'libavcodec/libvorbis.c')

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;
         }
     }
-- 
cgit v1.2.3