shithub: aubio

Download patch

ref: eacc55c3baeb063161e0bb96fa69fa2c52868683
parent: f91737deb4d00d8ce647251eb3b0e9e4d01c3652
author: Paul Brossier <piem@piem.org>
date: Mon Oct 3 07:47:25 EDT 2016

src/io/source_avcodec.c: fix missing samples in eof block

--- a/src/io/source_avcodec.c
+++ b/src/io/source_avcodec.c
@@ -351,7 +351,7 @@
     }
   }
   if (total_wrote < s->hop_size) {
-    for (i = end; i < s->hop_size; i++) {
+    for (i = total_wrote; i < s->hop_size; i++) {
       read_data->data[i] = 0.;
     }
   }
@@ -386,7 +386,7 @@
   }
   if (total_wrote < s->hop_size) {
     for (j = 0; j < read_data->height; j++) {
-      for (i = end; i < s->hop_size; i++) {
+      for (i = total_wrote; i < s->hop_size; i++) {
         read_data->data[j][i] = 0.;
       }
     }