diff -U2 -r /var/lib/copr-rpmbuild/results/openrv/upstream-unpacked/Source0/OpenRV-main/src/lib/image/MovieFFMpeg/MovieFFMpeg.cpp /var/lib/copr-rpmbuild/results/openrv/srpm-unpacked/main.tar.gz-extract/OpenRV-main/src/lib/image/MovieFFMpeg/MovieFFMpeg.cpp --- /var/lib/copr-rpmbuild/results/openrv/upstream-unpacked/Source0/OpenRV-main/src/lib/image/MovieFFMpeg/MovieFFMpeg.cpp 2025-02-21 16:43:05.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/openrv/srpm-unpacked/main.tar.gz-extract/OpenRV-main/src/lib/image/MovieFFMpeg/MovieFFMpeg.cpp 2025-02-13 20:16:45.000000000 +0000 @@ -4246,5 +4246,4 @@ avStream->time_base.num = m_duration; avStream->time_base.den = m_timeScale; - avStream->avg_frame_rate = av_d2q(m_info.fps, INT_MAX); avCodecContext->time_base.num = m_duration; avCodecContext->time_base.den = m_timeScale; @@ -4255,5 +4254,4 @@ avCodecContext->height = m_info.height; avCodecContext->color_primaries = AVCOL_PRI_BT709; // 1 - avCodecContext->framerate = avStream->avg_frame_rate; // // XXX should come back to this. should transfer function also be diff -U2 -r /var/lib/copr-rpmbuild/results/openrv/upstream-unpacked/Source0/OpenRV-main/src/lib/ip/IPBaseNodes/SequenceGroupIPNode.cpp /var/lib/copr-rpmbuild/results/openrv/srpm-unpacked/main.tar.gz-extract/OpenRV-main/src/lib/ip/IPBaseNodes/SequenceGroupIPNode.cpp --- /var/lib/copr-rpmbuild/results/openrv/upstream-unpacked/Source0/OpenRV-main/src/lib/ip/IPBaseNodes/SequenceGroupIPNode.cpp 2025-02-21 16:43:05.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/openrv/srpm-unpacked/main.tar.gz-extract/OpenRV-main/src/lib/ip/IPBaseNodes/SequenceGroupIPNode.cpp 2025-02-13 20:16:45.000000000 +0000 @@ -18,6 +18,4 @@ #include -#include - namespace IPCore { @@ -102,13 +100,7 @@ if (fps == 0.0 && !newInputs.empty()) { - // Find the first input that has a discovered imageRangeInfo, and - // use it for the fps if any. - auto it = std::find_if( - newInputs.begin(), newInputs.end(), [](const auto& input) - { return !input->imageRangeInfo().isUndiscovered; }); - if (it != newInputs.end()) - { - fps = (*it)->imageRangeInfo().fps; - } + auto const imageRangeInfo = newInputs[index]->imageRangeInfo(); + if (!imageRangeInfo.isUndiscovered) + fps = imageRangeInfo.fps; } diff -U2 -r /var/lib/copr-rpmbuild/results/openrv/upstream-unpacked/Source0/OpenRV-main/src/plugins/rv-packages/otio_reader/otio_reader.py /var/lib/copr-rpmbuild/results/openrv/srpm-unpacked/main.tar.gz-extract/OpenRV-main/src/plugins/rv-packages/otio_reader/otio_reader.py --- /var/lib/copr-rpmbuild/results/openrv/upstream-unpacked/Source0/OpenRV-main/src/plugins/rv-packages/otio_reader/otio_reader.py 2025-02-21 16:43:05.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/openrv/srpm-unpacked/main.tar.gz-extract/OpenRV-main/src/plugins/rv-packages/otio_reader/otio_reader.py 2025-02-13 20:16:45.000000000 +0000 @@ -261,7 +261,4 @@ } - # RV supports only one frame rate per sequence, so we'll use the rate of the first item in the sequence as our sequence rate - seq_rate = None - for thing in items_to_serialize: if isinstance(thing, tuple): @@ -275,12 +272,9 @@ edl_item, pre_item = thing, None - if seq_rate is None: - seq_rate = thing.trimmed_range().duration.rate - if result: new_inputs.append(result) - edl_range = _calculate_edl(edl, edl_time, edl_item, seq_rate, pre_item) - edl_time = edl_range.end_time_exclusive().rescaled_to(seq_rate) + edl_range = _calculate_edl(edl, edl_time, edl_item, pre_item) + edl_time = edl_range.end_time_exclusive() commands.setNodeInputs(new_seq, new_inputs) @@ -334,5 +328,5 @@ -def _calculate_edl(edl, edl_time, item, seq_rate, pre_transition_item=None): +def _calculate_edl(edl, edl_time, item, pre_transition_item=None): # EDL values don't make much sense for a transitions, since it has two # different sources as inputs. So if we have a transition, we'll just set @@ -345,5 +339,5 @@ out_frame = otio.opentime.to_frames(duration, rate) else: - in_frame, out_frame = _get_in_out_frame(item, item.trimmed_range(), seq_rate) + in_frame, out_frame = _get_in_out_frame(item, item.trimmed_range()) duration = item.trimmed_range().duration @@ -372,5 +366,5 @@ -def _get_in_out_frame(it, range_to_read, seq_rate=None): +def _get_in_out_frame(it, range_to_read): in_frame = out_frame = None @@ -385,10 +379,11 @@ if not in_frame and not out_frame: - rate = seq_rate if seq_rate is not None else range_to_read.duration.rate + # because OTIO has no global concept of FPS, the rate of the duration + # is used as the rate for the range of the source. in_frame = otio.opentime.to_frames( - range_to_read.start_time.rescaled_to(rate), rate=rate + range_to_read.start_time, rate=range_to_read.duration.rate ) out_frame = otio.opentime.to_frames( - range_to_read.end_time_inclusive().rescaled_to(rate), rate=rate + range_to_read.end_time_inclusive(), rate=range_to_read.duration.rate ) return (in_frame, out_frame)