We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edd290e commit be54bcaCopy full SHA for be54bca
avb/components.py
@@ -191,15 +191,16 @@ def nearest_component_at_time(self, edit_unit):
191
def nearest_index_at_time(self, edit_unit):
192
"""returns the index of the nearest component to edit_unit and its start position"""
193
last_component = None
194
- last_index = None
+ last_index = 0
195
last_pos = 0
196
197
- if edit_unit <= 0:
198
- return 0
199
-
200
# this needs to go past target index to handle Transitions
201
for index, position, component in self.positions():
202
+ # skip zero length FILL components
+ if component.length == 0:
+ continue
203
+
204
if component.class_id == b'TNFX':
205
if position <= edit_unit < position + component.length:
206
return index, position
0 commit comments