forked from 0x2620/pandora
avoid division by zero
This commit is contained in:
parent
191e5d44ad
commit
7936a2180e
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue