From a27576bb97a9ff602034d784cb502c4dc065ac36 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 21 Sep 2016 15:23:22 +0200 Subject: [PATCH] src/io/source_wavread.c: fix bytes_read for JUNK headers --- src/io/source_wavread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/source_wavread.c b/src/io/source_wavread.c index 9e00259b..f63447c2 100644 --- a/src/io/source_wavread.c +++ b/src/io/source_wavread.c @@ -135,9 +135,9 @@ aubio_source_wavread_t * new_aubio_source_wavread(const char_t * path, uint_t sa goto beach; } bytes_read += bytes_junk; - bytes_expected += bytes_junk; + bytes_expected += bytes_junk + 4; // now really read the fmt chunk - fread(buf, 1, 4, s->fid); + bytes_read += fread(buf, 1, 4, s->fid); buf[4] = '\0'; } -- 2.11.0