Mercurial > mplayer.hg
comparison libao2/ao_pulse.c @ 24920:12dc34b2e41c
Simplify argument "parsing"
author | reimar |
---|---|
date | Sat, 03 Nov 2007 10:37:22 +0000 |
parents | 51372a34bc7d |
children | 148ca265fcb6 |
comparison
equal
deleted
inserted
replaced
24919:51372a34bc7d | 24920:12dc34b2e41c |
---|---|
124 const struct format_map_s *fmt_map; | 124 const struct format_map_s *fmt_map; |
125 char *host = NULL; | 125 char *host = NULL; |
126 char *sink = NULL; | 126 char *sink = NULL; |
127 | 127 |
128 if (ao_subdevice) { | 128 if (ao_subdevice) { |
129 int i = strcspn(ao_subdevice, ":"); | |
130 host = strdup(ao_subdevice); | 129 host = strdup(ao_subdevice); |
131 if (host[i] == ':') | 130 sink = strchr(host, ':'); |
132 sink = &host[i + 1]; | 131 if (sink) *sink++ = 0; |
133 host[i] = 0; | |
134 } | 132 } |
135 | 133 |
136 ss.channels = channels; | 134 ss.channels = channels; |
137 ss.rate = rate_hz; | 135 ss.rate = rate_hz; |
138 | 136 |