1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 06:42:03 +00:00

TOOLS/stats-conv: don't crash on empty lines

This commit is contained in:
wm4 2014-05-11 18:16:33 +02:00
parent cc94436c5b
commit fd56e2dbe6

View File

@ -45,6 +45,9 @@ def get_event(event):
return G.events[event]
for line in [line.split("#")[0].strip() for line in open(filename, "r")]:
line = line.strip()
if not line:
continue
ts, event = line.split(" ", 1)
ts = int(ts) / 1000 # milliseconds
if G.start is None: