changeset 683:f84f147572b9

Avoid crash when generating/processing a very short file
author Chris Cannam
date Wed, 11 May 2011 11:04:02 +0100
parents bd527db65d20
children bcca512445f3
files transform/RealTimeEffectModelTransformer.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;