summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien ROGER <gulien.roger@gmail.com>2016-12-02 00:05:58 +0100
committerTim Mayberry <mojofunk@gmail.com>2016-12-06 22:41:25 +1000
commit0356d641958869cbfc1b49065ea298463cb1e313 (patch)
tree8b6fe0c5f39957286684b803fd523751f561a3b9
parentc5cda446e04b6abeadf417c32eaec6e8640c9ca4 (diff)
Fix #6753
Fix "Illegal instruction" due to recursive acquisition/multi release on a RWLock See #6753 notes
-rw-r--r--libs/ardour/playlist.cc20
1 files changed, 14 insertions, 6 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index c520f10b99..7b0f69e2ab 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -676,7 +676,11 @@ Playlist::flush_notifications (bool from_undo)
framepos_t pos = position;
if (times == 1 && auto_partition){
- partition(pos - 1, (pos + region->length()), true);
+ RegionList thawlist;
+ partition_internal (pos - 1, (pos + region->length()), true, thawlist);
+ for (RegionList::iterator i = thawlist.begin(); i != thawlist.end(); ++i) {
+ (*i)->resume_property_changes ();
+ }
}
if (itimes >= 1) {
@@ -873,8 +877,10 @@ Playlist::flush_notifications (bool from_undo)
Playlist::partition (framepos_t start, framepos_t end, bool cut)
{
RegionList thawlist;
-
- partition_internal (start, end, cut, thawlist);
+ {
+ RegionWriteLock lock(this);
+ partition_internal (start, end, cut, thawlist);
+ }
for (RegionList::iterator i = thawlist.begin(); i != thawlist.end(); ++i) {
(*i)->resume_property_changes ();
@@ -892,7 +898,6 @@ Playlist::flush_notifications (bool from_undo)
RegionList new_regions;
{
- RegionWriteLock rlock (this);
boost::shared_ptr<Region> region;
boost::shared_ptr<Region> current;
@@ -1119,7 +1124,7 @@ Playlist::flush_notifications (bool from_undo)
//keep track of any dead space at end (for pasting into Ripple or Splice mode)
framepos_t wanted_length = end-start;
- _end_space = wanted_length - get_extent().second-get_extent().first;
+ _end_space = wanted_length - _get_extent().second - _get_extent().first;
}
boost::shared_ptr<Playlist>
@@ -1185,7 +1190,10 @@ Playlist::flush_notifications (bool from_undo)
return boost::shared_ptr<Playlist>();
}
- partition_internal (start, start+cnt-1, true, thawlist);
+ {
+ RegionWriteLock rlock (this);
+ partition_internal (start, start+cnt-1, true, thawlist);
+ }
for (RegionList::iterator i = thawlist.begin(); i != thawlist.end(); ++i) {
(*i)->resume_property_changes();