diff --git a/app/codec/samplebuffer.cpp b/app/codec/samplebuffer.cpp index 1c5053f33..1dde4fbae 100644 --- a/app/codec/samplebuffer.cpp +++ b/app/codec/samplebuffer.cpp @@ -1,4 +1,4 @@ -/*** +/*** Olive - Non-Linear Video Editor Copyright (C) 2019 Olive Team @@ -64,7 +64,7 @@ SampleBufferPtr SampleBuffer::CreateFromPackedData(const AudioRenderingParams &a const float* packed_data = reinterpret_cast(bytes.constData()); for (int i=0;idata_[channel][index] = packed_data[i]; @@ -256,6 +256,8 @@ QByteArray SampleBuffer::toPackedData() const void SampleBuffer::allocate_sample_buffer(float ***data, int nb_channels, int nb_samples) { + Q_ASSERT(nb_samples > 0); + *data = new float* [nb_channels]; for (int i=0;i