Skip to content

Commit

Permalink
Fix libao output driver.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
plietar committed Jun 9, 2013
1 parent 38799dc commit e301306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion audio_ao.c
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit e301306

Please sign in to comment.