level: Use the correct number of samples to iterate over the input array
authorSebastian Dröge <sebastian@centricular.com>
Wed, 16 Apr 2014 16:49:43 +0000 (18:49 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 16 Apr 2014 16:50:50 +0000 (18:50 +0200)
Fixes invalid memory accesses and accesses to uninitialised data.

gst/level/gstlevel.c

index cfd5bce..139de1f 100644 (file)
@@ -677,7 +677,7 @@ gst_level_transform_ip (GstBaseTransform * trans, GstBuffer * in)
         filter->decay_peak_age[i] = G_GINT64_CONSTANT (0);
       }
     }
-    in_data += ((block_int_size * bps) - bps);
+    in_data += block_size * bps;
 
     filter->num_frames += block_size;
     num_frames -= block_size;