diff libvorbis.c @ 5525:bc4791868c52 libavcodec

various simplifications around recent av_clip_int16() usage
author aurel
date Sat, 11 Aug 2007 23:17:03 +0000
parents c2ab2ac31edb
children 5a61e8e2f65c
line wrap: on
line diff
--- a/libvorbis.c	Sat Aug 11 23:09:28 2007 +0000
+++ b/libvorbis.c	Sat Aug 11 23:17:03 2007 +0000
@@ -295,7 +295,7 @@
 
 
 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 @@
         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;
         }
     }