alsa-seq: fix port delete

We need to first mark the removed port as invalid, and then look for the
last valid port in the port array otherwise last_port becomes 0 and
midi dataflow stops.

Fixes #1601
This commit is contained in:
Wim Taymans 2021-09-14 18:08:30 +02:00
parent bf29130f84
commit d793086174
2 changed files with 9 additions and 1 deletions

View file

@ -247,6 +247,11 @@ static void alsa_seq_on_sys(struct spa_source *source)
addr->client, addr->port);
state->port_info(state->port_info_data, addr, NULL);
break;
default:
spa_log_info(state->log, "unhandled event %d: %d:%d",
ev->type, addr->client, addr->port);
break;
}
snd_seq_free_event(ev);
}