Fix playlist partitioning when mixing time domains

This commit is contained in:
Robin Gareus 2023-09-27 22:15:25 +02:00
parent 9651a2c2e2
commit c4f6385d22
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 9 additions and 2 deletions

View File

@ -435,7 +435,7 @@ protected:
int remove_region_internal (std::shared_ptr<Region>, ThawList& thawlist);
void copy_regions (RegionList&) const;
void partition_internal (timepos_t const & start, timepos_t const & end, bool cutting, ThawList& thawlist);
void partition_internal (timepos_t start, timepos_t end, bool cutting, ThawList& thawlist);
std::pair<timepos_t, timepos_t> _get_extent() const;

View File

@ -988,8 +988,15 @@ Playlist::partition (timepos_t const & start, timepos_t const & end, bool cut)
* removed.
*/
void
Playlist::partition_internal (timepos_t const & start, timepos_t const & end, bool cutting, ThawList& thawlist)
Playlist::partition_internal (timepos_t start, timepos_t end, bool cutting, ThawList& thawlist)
{
if (start.time_domain () != end.time_domain () || start.time_domain () != time_domain () || end.time_domain () != time_domain ()) {
warning << string_compose (_("Playlist::partition_internal() with time domains mismatch %1 %2 (expected %3 time)"), start, end, time_domain () == Temporal::AudioTime ? "audio" : " music") << endmsg;
}
start.set_time_domain (time_domain ());
end.set_time_domain (time_domain ());
RegionList new_regions;
{