Fix error when duration is N/A
This commit is contained in:
parent
cf386691b0
commit
a84aea081b
5 changed files with 15 additions and 6 deletions
|
|
@ -598,8 +598,11 @@ class avconv(devedeng.avbase.avbase):
|
|||
parts = data[0][pos:pos2].split(":")
|
||||
t = 0.0
|
||||
for e in parts:
|
||||
t *= 60.0
|
||||
t += float(e)
|
||||
try:
|
||||
v = float(e)
|
||||
except:
|
||||
continue
|
||||
t = t * 60.0 + v
|
||||
t /= self.final_length
|
||||
self.progress_bar[1].set_fraction(t)
|
||||
self.progress_bar[1].set_text("%.1f%%" % (100.0 * t))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue