summaryrefslogtreecommitdiff
path: root/GstDebugViewer/Plugins
diff options
context:
space:
mode:
authorRené Stadler <mail@renestadler.de>2007-11-29 15:34:35 +0200
committerRené Stadler <mail@renestadler.de>2007-11-29 15:34:35 +0200
commit0a31db288ce9d54423ff7b8c13fca4baed372605 (patch)
tree669ada53ba14030f3bcfd3cf5690d22072e1c9fb /GstDebugViewer/Plugins
parent536539b6615925bd76fe192d02ed3f4eae57c2b0 (diff)
Fix hanging after loading an unparsable/colored file
Diffstat (limited to 'GstDebugViewer/Plugins')
-rw-r--r--GstDebugViewer/Plugins/Timeline.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/GstDebugViewer/Plugins/Timeline.py b/GstDebugViewer/Plugins/Timeline.py
index 4ea47d1..1b4cec8 100644
--- a/GstDebugViewer/Plugins/Timeline.py
+++ b/GstDebugViewer/Plugins/Timeline.py
@@ -90,15 +90,20 @@ class LineFrequencySentinel (object):
return
last_ts = None
+ i = 0
+ UNPARSABLE_LIMIT = 500
for row in iter_model_reversed (self.model):
last_ts = row[model.COL_TIME]
# FIXME: We ignore 0 here (unparsable lines!), this should be
# handled differently!
+ i += 1
+ if i == UNPARSABLE_LIMIT:
+ break
if last_ts:
last_index = row.path[0]
break
- if last_ts is None:
+ if last_ts is None or last_ts < first_ts:
return
step = int (float (last_ts - first_ts) / float (self.n_partitions))