mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
Fix hanging after loading an unparsable/colored file
This commit is contained in:
parent
527b3ed2ef
commit
8fe97e709c
1 changed files with 6 additions and 1 deletions
|
@ -90,15 +90,20 @@ class LineFrequencySentinel (object):
|
||||||
return
|
return
|
||||||
|
|
||||||
last_ts = None
|
last_ts = None
|
||||||
|
i = 0
|
||||||
|
UNPARSABLE_LIMIT = 500
|
||||||
for row in iter_model_reversed (self.model):
|
for row in iter_model_reversed (self.model):
|
||||||
last_ts = row[model.COL_TIME]
|
last_ts = row[model.COL_TIME]
|
||||||
# FIXME: We ignore 0 here (unparsable lines!), this should be
|
# FIXME: We ignore 0 here (unparsable lines!), this should be
|
||||||
# handled differently!
|
# handled differently!
|
||||||
|
i += 1
|
||||||
|
if i == UNPARSABLE_LIMIT:
|
||||||
|
break
|
||||||
if last_ts:
|
if last_ts:
|
||||||
last_index = row.path[0]
|
last_index = row.path[0]
|
||||||
break
|
break
|
||||||
|
|
||||||
if last_ts is None:
|
if last_ts is None or last_ts < first_ts:
|
||||||
return
|
return
|
||||||
|
|
||||||
step = int (float (last_ts - first_ts) / float (self.n_partitions))
|
step = int (float (last_ts - first_ts) / float (self.n_partitions))
|
||||||
|
|
Loading…
Reference in a new issue