changeset 25649:5cf7cb85128f

Slightly deobfuscate
author reimar
date Fri, 11 Jan 2008 20:42:32 +0000
parents 2438052a176e
children da94a5973768
files libao2/ao_jack.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_jack.c	Fri Jan 11 20:36:33 2008 +0000
+++ b/libao2/ao_jack.c	Fri Jan 11 20:42:32 2008 +0000
@@ -254,11 +254,12 @@
   if (!port_name)
     port_flags |= JackPortIsPhysical;
   matching_ports = jack_get_ports(client, port_name, NULL, port_flags);
-  for (num_ports = 0; matching_ports && matching_ports[num_ports]; num_ports++) ;
-  if (!num_ports) {
+  if (!matching_ports || !matching_ports[0]) {
     mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] no physical ports available\n");
     goto err_out;
   }
+  num_ports = 1;
+  while (matching_ports[num_ports]) num_ports++;
   if (channels > num_ports) channels = num_ports;
   num_ports = channels;