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,6 +1039,7 @@ class Item(models.Model):
|
||||||
color = map(lambda a,b: (a+b)/n, color,ox.image.getRGB(s.color))
|
color = map(lambda a,b: (a+b)/n, color,ox.image.getRGB(s.color))
|
||||||
offset += s.duration
|
offset += s.duration
|
||||||
self.data['color'] = ox.image.getHSL(color)
|
self.data['color'] = ox.image.getHSL(color)
|
||||||
|
if offset:
|
||||||
self.data['volume'] /= offset
|
self.data['volume'] /= offset
|
||||||
#extract.timeline_strip(self, self.data['cuts'], stream.info, self.timeline_prefix[:-8])
|
#extract.timeline_strip(self, self.data['cuts'], stream.info, self.timeline_prefix[:-8])
|
||||||
self.select_frame()
|
self.select_frame()
|
||||||
|
|
Loading…
Reference in a new issue