summaryrefslogtreecommitdiff
path: root/src/lib/sndfile_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-05-08 16:58:19 +0100
committerCarl Hetherington <cth@carlh.net>2013-05-08 16:58:19 +0100
commit83742c7e6edcf958e0820abc77c029f4ada4880f (patch)
treec56eed285dd742cee8d2cc6584be37a41722ee47 /src/lib/sndfile_decoder.cc
parentb66a082df05202f0119b16853f04034cf85ec80b (diff)
Better fix for still (no sound) DCP crash.
Diffstat (limited to 'src/lib/sndfile_decoder.cc')
-rw-r--r--src/lib/sndfile_decoder.cc6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/lib/sndfile_decoder.cc b/src/lib/sndfile_decoder.cc
index d70478a1b..fdaf2eeaa 100644
--- a/src/lib/sndfile_decoder.cc
+++ b/src/lib/sndfile_decoder.cc
@@ -102,20 +102,14 @@ SndfileDecoder::pass ()
sf_count_t const block = _audio_stream->sample_rate() / 2;
shared_ptr<AudioBuffers> audio (new AudioBuffers (_audio_stream->channels(), block));
sf_count_t const this_time = min (block, _frames - _done);
- bool have_sound = false;
for (size_t i = 0; i < _sndfiles.size(); ++i) {
if (!_sndfiles[i]) {
audio->make_silent (i);
} else {
sf_read_float (_sndfiles[i], audio->data(i), this_time);
- have_sound = true;
}
}
- if (!have_sound) {
- return true;
- }
-
audio->set_frames (this_time);
Audio (audio, double(_done) / _audio_stream->sample_rate());
_done += this_time;