summaryrefslogtreecommitdiff
path: root/libs/ardour/tempo.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-01-24 22:42:43 +0000
committerCarl Hetherington <carl@carlh.net>2012-01-24 22:42:43 +0000
commit275e710e671409421b6a1155bfeeff0d4580a87a (patch)
treea889b17a784a947760fe9b197e6279f974ec7e7a /libs/ardour/tempo.cc
parent34581e4de93e304680f947e049a4afdb2297ceb3 (diff)
Move reader lock to avoid deadlock when calling bbt_time().
git-svn-id: svn://localhost/ardour2/branches/3.0@11342 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r--libs/ardour/tempo.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index 9a4877c451..ef74c09c27 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -1187,14 +1187,11 @@ TempoMap::frame_time (const BBT_Time& bbt)
framecnt_t
TempoMap::bbt_duration_at (framepos_t pos, const BBT_Time& bbt, int dir)
{
- Glib::RWLock::ReaderLock lm (lock);
- framecnt_t frames = 0;
BBT_Time when;
-
bbt_time (pos, when);
- frames = bbt_duration_at_unlocked (when, bbt,dir);
-
- return frames;
+
+ Glib::RWLock::ReaderLock lm (lock);
+ return bbt_duration_at_unlocked (when, bbt, dir);
}
framecnt_t