diff wmadec.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 0f2c4fa2c4f2
line wrap: on
line diff
--- a/wmadec.c	Sat Aug 11 23:09:28 2007 +0000
+++ b/wmadec.c	Sat Aug 11 23:17:03 2007 +0000
@@ -712,7 +712,7 @@
 /* decode a frame of frame_len samples */
 static int wma_decode_frame(WMACodecContext *s, int16_t *samples)
 {
-    int ret, i, n, a, ch, incr;
+    int ret, i, n, ch, incr;
     int16_t *ptr;
     float *iptr;
 
@@ -739,9 +739,7 @@
         iptr = s->frame_out[ch];
 
         for(i=0;i<n;i++) {
-            a = lrintf(*iptr++);
-            a = av_clip_int16(a);
-            *ptr = a;
+            *ptr = av_clip_int16(lrintf(*iptr++));
             ptr += incr;
         }
         /* prepare for next block */