shithub: aubio

Download patch

ref: 4edba9d0548d88fa62c406078e5cca441b5cb825
parent: 1ddb9d1f40161df689a684f530fa91c9c043d270
author: Paul Brossier <piem@piem.org>
date: Thu Dec 20 14:26:08 EST 2018

[io] fix source output padding sizes

--- a/src/io/ioutils.c
+++ b/src/io/ioutils.c
@@ -96,8 +96,8 @@
 aubio_source_pad_output (fvec_t *read_data, uint_t source_read)
 {
   if (source_read < read_data->length) {
-    AUBIO_MEMSET(read_data->data + source_read, 0, read_data->length -
-        source_read);
+    AUBIO_MEMSET(read_data->data + source_read, 0,
+        (read_data->length - source_read) * sizeof(smpl_t));
   }
 }
 
@@ -108,7 +108,7 @@
   if (source_read < read_data->length) {
     for (i = 0; i < read_data->height; i++) {
       AUBIO_MEMSET(read_data->data[i] + source_read, 0,
-          read_data->length - source_read);
+          (read_data->length - source_read) * sizeof(smpl_t));
     }
   }