summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_diskstream.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-04-17 16:46:22 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-04-17 16:46:22 +0000
commitb290949195221d1db3367eed28637eef9ee7766d (patch)
treed0476b629da8cfeb86b466625f9b8b769236bc48 /libs/ardour/audio_diskstream.cc
parentfbdd0ab815e7829db93bc27f8c6e508b7da94921 (diff)
new greek translations; fix for crash in diskstream due to removed port access
git-svn-id: svn://localhost/ardour2/trunk@1726 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audio_diskstream.cc')
-rw-r--r--libs/ardour/audio_diskstream.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index 48085d4922..b372c14b57 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -610,7 +610,16 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_
if (nominally_recording || rec_nframes) {
- for (n = 0, chan = c->begin(); chan != c->end(); ++chan, ++n) {
+ uint32_t limit = _io->n_inputs ();
+
+ /* one or more ports could already have been removed from _io, but our
+ channel setup hasn't yet been updated. prevent us from trying to
+ use channels that correspond to missing ports. note that the
+ process callback (from which this is called) is always atomic
+ with respect to port removal/addition.
+ */
+
+ for (n = 0, chan = c->begin(); chan != c->end() && n < limit; ++chan, ++n) {
ChannelInfo* chaninfo (*chan);