Merge pull request #1771 from BrandonHalig/patch-3
Confirm out_time_ms is a number
This commit is contained in:
1 file changed
+6
-2
@@ -46,8 +46,12 @@ class ProgressFfmpeg(threading.Thread):
|
||||
if lines:
|
||||
for line in lines:
|
||||
if "out_time_ms" in line:
|
||||
out_time_ms = line.split("=")[1]
|
||||
return int(out_time_ms) / 1000000.0
|
||||
out_time_ms_str = line.split("=")[1].strip()
|
||||
if out_time_ms_str.isnumeric():
|
||||
return float(out_time_ms_str) / 1000000.0
|
||||
else:
|
||||
# Handle the case when "N/A" is encountered
|
||||
return None
|
||||
return None
|
||||
|
||||
def stop(self):
|
||||
|
||||
Reference in new issue
Block a user