timeline width should never be 0
This commit is contained in:
parent
e022c47961
commit
c9ba3dfa89
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ class GstTimeline:
|
||||||
|
|
||||||
def cropAndSave(self):
|
def cropAndSave(self):
|
||||||
if self.frames:
|
if self.frames:
|
||||||
mini_width = int(self.frames / self.fps)
|
mini_width = int(math.ceil(float(self.frames) / self.fps))
|
||||||
mini_width = min(mini_width, bar_part_time)
|
mini_width = min(mini_width, bar_part_time)
|
||||||
#crop if segment is shorter
|
#crop if segment is shorter
|
||||||
c = self.bar.crop((0, 0, self.frames,bar_height))
|
c = self.bar.crop((0, 0, self.frames,bar_height))
|
||||||
|
|
Loading…
Reference in a new issue