OpenTimelineIO / OpenTimelineIO-Swift-Bindings

Swift bindings for the OpenTimelineIO Library (http://opentimeline.io)
http://opentimeline.io
Apache License 2.0
19 stars 11 forks source link

MediaReference init method does not record availableRange #3

Closed meshula closed 3 years ago

meshula commented 3 years ago

The initializer is missing an assignment of availableRange, see below.


public class ExternalReference : MediaReference {
    override public init() {
        super.init(otio_new_external_reference())
    }

    public convenience init<ST : Sequence>(targetURL: URL? = nil,
                                           availableRange: TimeRange? = nil,
                                           metadata: ST? = nil) where ST.Element == Metadata.Dictionary.Element {
        self.init()
        metadataInit(name, metadata)
        if let targetURL = targetURL {
            self.targetURL = targetURL
        }
    }
meshula commented 3 years ago

Was fixed by https://github.com/OpenTimelineIO/OpenTimelineIO-Swift-Bindings/commit/5076182d8170f85aef07b37de0f19160690d589a#diff-4538989320568f1de1083f553ecda4b0342af551bbc2aac91d061e7f6a2d0130