Fix libao output driver.

The driver id returned by libao wasn't checked correctly.
When the driver did not exist, libao returns a negative number. The
libao output driver checked for a non zero id.
This caused shairport to refuse to use the first driver, and not fail
when using a non-existant driver.
This commit is contained in:
Paul Lietar
2013-06-09 20:32:29 +02:00
parent 38799dc1b1
commit e301306a35
+1 -1
View File
@@ -55,7 +55,7 @@ static int init(int argc, char **argv) {
switch (opt) {
case 'd':
driver = ao_driver_id(optarg);
if (!driver)
if (driver < 0)
die("could not find ao driver %s", optarg);
break;
case 'i':