From: Paul Brossier Date: Wed, 21 Sep 2016 13:23:22 +0000 (+0200) Subject: src/io/source_wavread.c: fix bytes_read for JUNK headers X-Git-Tag: 0.4.4~217 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=a27576bb97a9ff602034d784cb502c4dc065ac36;p=aubio.git src/io/source_wavread.c: fix bytes_read for JUNK headers --- 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'; }