comparison transform/RealTimeEffectModelTransformer.cpp @ 683:f84f147572b9

Avoid crash when generating/processing a very short file
author Chris Cannam
date Wed, 11 May 2011 11:04:02 +0100
parents b6dc6c7f402c
children 573d45e9487b
comparison
equal deleted inserted replaced
682:bd527db65d20 683:f84f147572b9
177 while (blockFrame < contextStart + contextDuration + latency && 177 while (blockFrame < contextStart + contextDuration + latency &&
178 !m_abandoned) { 178 !m_abandoned) {
179 179
180 long completion = 180 long completion =
181 (((blockFrame - contextStart) / blockSize) * 99) / 181 (((blockFrame - contextStart) / blockSize) * 99) /
182 ((contextDuration) / blockSize); 182 (1 + ((contextDuration) / blockSize));
183 183
184 long got = 0; 184 long got = 0;
185 185
186 if (channelCount == 1) { 186 if (channelCount == 1) {
187 if (inbufs && inbufs[0]) { 187 if (inbufs && inbufs[0]) {