comparison libao2/ao_pulse.c @ 35202:aa10c22f69f4

Fix crash when only specifying a host for -ao pulse.
author reimar
date Tue, 30 Oct 2012 17:44:02 +0000
parents f2c90c9dd61c
children 99708d402208
comparison
equal deleted inserted replaced
35201:522fcb8ffb1b 35202:aa10c22f69f4
154 char *opts; 154 char *opts;
155 devarg = strdup(ao_subdevice); 155 devarg = strdup(ao_subdevice);
156 sink = strchr(devarg, ':'); 156 sink = strchr(devarg, ':');
157 if (sink) *sink++ = 0; 157 if (sink) *sink++ = 0;
158 if (devarg[0]) host = devarg; 158 if (devarg[0]) host = devarg;
159 opts = strchr(sink, ':'); 159 opts = sink ? strchr(sink, ':') : NULL;
160 if (opts) { 160 if (opts) {
161 *opts++ = 0; 161 *opts++ = 0;
162 if (!sink[0]) sink = NULL; 162 if (!sink[0]) sink = NULL;
163 if (subopt_parse(opts, subopts)) 163 if (subopt_parse(opts, subopts))
164 goto fail; 164 goto fail;