13
0

Fix crash on reading meta event.

git-svn-id: svn://localhost/ardour2/branches/3.0@4586 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2009-02-15 20:50:20 +00:00
parent 59972b5550
commit 3cfb9126af
2 changed files with 3 additions and 3 deletions

View File

@ -174,14 +174,14 @@ SMFSource::read_unlocked (MidiRingBuffer<nframes_t>& dst, nframes_t start, nfram
break;
}
ev_type = EventTypeMap::instance().midi_event_type(ev_buffer[0]);
time += ev_delta_t; // accumulate delta time
if (ret == 0) { // meta-event (skipped, just accumulate time)
continue;
}
ev_type = EventTypeMap::instance().midi_event_type(ev_buffer[0]);
assert(time >= start_ticks);
const nframes_t ev_frame_time = (nframes_t)(
((time / (double)ppqn()) * frames_per_beat)) + stamp_offset;

View File

@ -358,7 +358,7 @@ Sequence<Time>::const_iterator::operator++()
#ifdef DEBUG_SEQUENCE
cerr << "Iterator = SysEx" << endl;
#endif
*_event =*(*_sysex_iter);
*_event = *(*_sysex_iter);
++_sysex_iter;
} else {
#ifdef DEBUG_SEQUENCE