Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

o work around broken files - don't endlessloop :)

  • Loading branch information...
commit 9c0ba158a97a985819e6c6f1cc30d6ea2d35c70d 1 parent 78e66dd
@hzeller authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 convolver.cc
View
8 convolver.cc
@@ -295,6 +295,14 @@ class SndFileHandler :
zita_.convproc->start_process(0, 0);
}
int r = sf_readf_float(snd_in_, raw_sample_buffer_, zita_.fragm);
+ if (r == 0) {
+ LOG_ERROR(stderr, "Expected %d frames left, gave buffer sized %d, "
+ "but got EOF; corrupt file '%s' ?\n",
+ input_frames_left_, zita_.fragm, file_name_.c_str());
+ input_frames_left_ = 0;
+ Close();
+ return false;
+ }
if (r < (int) zita_.fragm) {
// Zero out the rest of the buffer.
const int missing = zita_.fragm - r;
Please sign in to comment.
Something went wrong with that request. Please try again.