From e301306a35f4b46a224c2e6b8900abee94cfddb8 Mon Sep 17 00:00:00 2001 From: Paul Lietar Date: Sun, 9 Jun 2013 20:32:29 +0200 Subject: [PATCH] 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. --- audio_ao.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio_ao.c b/audio_ao.c index 269aac56..c9ccd309 100644 --- a/audio_ao.c +++ b/audio_ao.c @@ -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':