avoid division by zero

This commit is contained in:
j 2012-05-30 17:52:50 +02:00
parent 191e5d44ad
commit 7936a2180e

View File

@ -1039,7 +1039,8 @@ class Item(models.Model):
color = map(lambda a,b: (a+b)/n, color,ox.image.getRGB(s.color))
offset += s.duration
self.data['color'] = ox.image.getHSL(color)
self.data['volume'] /= offset
if offset:
self.data['volume'] /= offset
#extract.timeline_strip(self, self.data['cuts'], stream.info, self.timeline_prefix[:-8])
self.select_frame()
self.make_poster(True)