AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO
Flattening tracks sometimes splits contiguous clips into segments
- Dominant language
- C++
- Stars
- 2k
- Forks
- 351
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 1
Description
### Incorrect Functionality
If a track has adjacent Gaps, then items below the boundary between those Gaps are sliced in an unexpected way.
## To Reproduce
Using this test file "bug_before_flatten_redacted.otio"...
[flatten_bug_repro.zip](https://github.com/AcademySoftwareFoundation/OpenTimelineIO/files/11872212/flatten_bug_repro.zip)
Run this command:
```
% otiotool -i bug_before_flatten_redacted.otio --flatten video -o out.otio
```
## Expected Behavior
Clips below adjacent Gaps should not be segmented by the flatten operation. In the provided example, `Clip #1` should be left as-is.
## Screenshots
Here is a screenshot before flattening (note the highlighted Gap on the top track)

Here is the result after flattening (note that `Clip #1` has been split in two)

Contributor guide
Research direction
Reproduce the issue with otiotool using bug_before_flatten_redacted.otio from flatten_bug_repro.zip and the documented --flatten video command. Trace the flatten operation from that CLI entry point and verify the fix by confirming that Clip #1 remains contiguous rather than being split at adjacent Gaps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100