Gracefully avoid importing audio that somehow has 0 channels.
This commit is contained in:
parent
e5d9fd1aac
commit
8dde26da7b
|
@ -234,7 +234,9 @@ write_audio_data_to_new_files (ImportableSource* source, ImportStatus& status,
|
|||
const framecnt_t nframes = ResampledImportableSource::blocksize;
|
||||
boost::shared_ptr<AudioFileSource> afs;
|
||||
uint32_t channels = source->channels();
|
||||
assert(channels > 0);
|
||||
if (channels == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
boost::scoped_array<float> data(new float[nframes * channels]);
|
||||
vector<boost::shared_array<Sample> > channel_data;
|
||||
|
|
Loading…
Reference in New Issue
Block a user