Skip to content

Commit 9aa8853

Browse files
iSchluffj616
authored andcommitted
examples/simple_edit: default to 0:0 segment ts_offset as mandated by spec
1 parent 6bea55f commit 9aa8853

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/simple_edit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async def simple_edit(
157157
# The media timeline started at zero when the ingest started, so `ts_offset` indicates what must be
158158
# added to the media time to get the Flow time.
159159
# So we can calculate media time at the start of the segment
160-
seg_offset = Timestamp.from_str(segment["ts_offset"])
160+
seg_offset = Timestamp.from_str(segment.get("ts_offset", "0:0"))
161161
media_time = seg_tr.start - seg_offset
162162

163163
# Now we want to know what to add to that media time to get the new start time

0 commit comments

Comments
 (0)