Skip to content

Commit

Permalink
fix flatten stack splits contiguous clips issue and add tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ramesh Maddhu <[email protected]>
Signed-off-by: Mark Reid <[email protected]>
  • Loading branch information
rameshm committed Dec 6, 2024
1 parent 413f14e commit 3510ade
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/opentimelineio/stackAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ _flatten_next_item(
}

auto children = track->children();
int children_size = static_cast<int>(children.size());
for (int i = 0; i < children_size; i++)
for (size_t i = 0; i < children.size(); i++)
{
std::optional<TimeRange> trim = std::nullopt;
SerializableObject::Retainer<Composable> child = children[i];
Expand Down Expand Up @@ -103,7 +102,7 @@ _flatten_next_item(
trim = child_trim;
}

if (i+1 < children_size)
if (i+1 < children.size())
{
child = children[i++];
}
Expand Down

0 comments on commit 3510ade

Please sign in to comment.