[MPlayer-cvslog] r25677 - trunk/libao2/ao_jack.c

reimar subversion at mplayerhq.hu
Fri Jan 11 21:42:33 CET 2008


Author: reimar
Date: Fri Jan 11 21:42:32 2008
New Revision: 25677

Log:
Slightly deobfuscate


Modified:
   trunk/libao2/ao_jack.c

Modified: trunk/libao2/ao_jack.c
==============================================================================
--- trunk/libao2/ao_jack.c	(original)
+++ trunk/libao2/ao_jack.c	Fri Jan 11 21:42:32 2008
@@ -254,11 +254,12 @@ static int init(int rate, int channels, 
   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;
 



More information about the MPlayer-cvslog mailing list