[MPlayer-cvslog] r24948 - trunk/libao2/ao_pulse.c

reimar subversion at mplayerhq.hu
Sat Nov 3 11:37:22 CET 2007


Author: reimar
Date: Sat Nov  3 11:37:22 2007
New Revision: 24948

Log:
Simplify argument "parsing"


Modified:
   trunk/libao2/ao_pulse.c

Modified: trunk/libao2/ao_pulse.c
==============================================================================
--- trunk/libao2/ao_pulse.c	(original)
+++ trunk/libao2/ao_pulse.c	Sat Nov  3 11:37:22 2007
@@ -126,11 +126,9 @@ static int init(int rate_hz, int channel
     char *sink = NULL;
 
     if (ao_subdevice) {
-        int i = strcspn(ao_subdevice, ":");
         host = strdup(ao_subdevice);
-        if (host[i] == ':')
-            sink = &host[i + 1];
-        host[i] = 0;
+        sink = strchr(host, ':');
+        if (sink) *sink++ = 0;
     }
 
     ss.channels = channels;



More information about the MPlayer-cvslog mailing list