diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-12-15 19:35:30 +1100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-12-16 09:36:13 +1100 |
commit | 3ea38f37bc1895cf25feaa52e5458358af01cf30 (patch) | |
tree | c6aaed9f03956059098cfc4678d2c9253275bb3b | |
parent | 77ab90d7344ea8fbcc382277c7064bf3564681f0 (diff) |
src/wav.c : Handle 'smpl' chunks with loop count of 0.
Closes: https://github.com/erikd/libsndfile/issues/86
-rw-r--r-- | src/wav.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1575,6 +1575,9 @@ wav_read_smpl_chunk (SF_PRIVATE *psf, uint32_t chunklen) bytesread += psf_binheader_readf (psf, "4", &loop_count) ; psf_log_printf (psf, " Loop Count : %u\n", loop_count) ; + if (loop_count == 0 && chunklen == bytesread) + return 0 ; + /* Sampler Data holds the number of data bytes after the CUE chunks which ** is not actually CUE data. Display value after CUE data. */ |