diff 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
line wrap: on
line diff
--- a/transform/RealTimeEffectModelTransformer.cpp	Tue May 10 17:55:57 2011 +0100
+++ b/transform/RealTimeEffectModelTransformer.cpp	Wed May 11 11:04:02 2011 +0100
@@ -179,7 +179,7 @@
 
 	long completion =
 	    (((blockFrame - contextStart) / blockSize) * 99) /
-	    ((contextDuration) / blockSize);
+	    (1 + ((contextDuration) / blockSize));
 
 	long got = 0;