AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO
Several adapters assume available_range is set on media references (FCP XML, EDL, SVG, more?)
- Dominant language
- C++
- Stars
- 2k
- Forks
- 351
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 1
Description
When the FCP 7 XML adapter encounters a timeline where `MediaReference` objects have no `available_range` set (as common when loading EDLs), it errors out:
```
(redacted for brevity)
File "/Users/username/envs/otiocppdev/lib/python3.7/site-packages/opentimelineio/adapters/fcp_xml.py", line 1483, in _build_file
file_e.append(_build_rate(available_range.start_time.rate))
AttributeError: 'NoneType' object has no attribute 'start_time'
```
In this case, the adapter could fallback to the clip's `source_range`.
This also brings up some considerations generally about how the FCP XML adapter should be building `file` nodes in the XML, there is currently no resolution of two `MediaReference` instances with the same `target_url` but different `available_range`.
Relates to #627 - This area of code is strongly targeted at `ExternalReference`
Contributor guide
Research direction
Start in the FCP XML adapter at fcp_xml.py line 1483, where _build_file dereferences MediaReference.available_range, and reproduce the failure with a reference loaded from an EDL. Compare the available_range and source_range handling, then review the related concerns in #627 and the cases involving identical target_url values. Done should include defined behavior for missing ranges without the current exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100