]> git.alsa-project.org Git - alsa-lib.git/commitdiff
MIDI event decoder: prevent running status after sysex
authorClemens Ladisch <clemens@ladisch.de>
Mon, 22 Jun 2009 08:00:03 +0000 (10:00 +0200)
committerClemens Ladisch <clemens@ladisch.de>
Mon, 22 Jun 2009 08:00:03 +0000 (10:00 +0200)
Running status cannot be using in the command immediately following
a system exclusive command, so we have to reset the running status
state in that case.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
src/seq/seq_midi_event.c

index b5caa1b8a67217007900089103d76ce820c80557..92c749ab21c47df3448fd06f012083fea75523c7 100644 (file)
@@ -442,6 +442,7 @@ long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count
 
 
        if (cmd == MIDI_CMD_COMMON_SYSEX) {
+               snd_midi_event_reset_decode(dev);
                qlen = ev->data.ext.len;
                if (count < qlen)
                        return -ENOMEM;