ao_jack: only auto-connect to audio ports

This prevents ao_jack from auto-connecting to MIDI ports (or other,
hypothetical future port types).

(cherry picked from commit fed0ea111b)
This commit is contained in:
Niklas Haas authored and Jan Ekström committed 2018-09-29 23:06:49 +03:00
1 parent c994a81aa4
commit a8a4c7def7
1 file changed
+2 -1
+2 -1
View File
@@ -143,7 +143,8 @@ connect_to_outports(struct ao *ao)
if (!port_name)
port_flags |= JackPortIsPhysical;
matching_ports = jack_get_ports(p->client, port_name, NULL, port_flags);
const char *port_type = JACK_DEFAULT_AUDIO_TYPE; // exclude MIDI ports
matching_ports = jack_get_ports(p->client, port_name, port_type, port_flags);
if (!matching_ports || !matching_ports[0]) {
MP_FATAL(ao, "no ports to connect to\n");