dont fail for clips < 0

This commit is contained in:
j 2012-10-09 19:22:16 +02:00
parent 6fd5adbb1d
commit 22e7dc7421

View file

@ -17,7 +17,7 @@ class MetaClip:
start = min(self.start, self.item.sort.duration) start = min(self.start, self.item.sort.duration)
end = min(self.end, self.item.sort.duration) end = min(self.end, self.item.sort.duration)
self.duration = end - start self.duration = end - start
if int(end*25) - int(start*25): if int(end*25) - int(start*25) > 0:
self.hue, self.saturation, self.lightness = extract.average_color( self.hue, self.saturation, self.lightness = extract.average_color(
self.item.timeline_prefix, self.start, self.end) self.item.timeline_prefix, self.start, self.end)
self.volume = extract.average_volume(self.item.timeline_prefix, self.start, self.end) self.volume = extract.average_volume(self.item.timeline_prefix, self.start, self.end)