summaryrefslogtreecommitdiffstats
path: root/stream/ai_sndio.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/ai_sndio.c')
-rw-r--r--stream/ai_sndio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/stream/ai_sndio.c b/stream/ai_sndio.c
index 2bb47955a4..10e95cea62 100644
--- a/stream/ai_sndio.c
+++ b/stream/ai_sndio.c
@@ -38,7 +38,10 @@ int ai_sndio_init(audio_in_t *ai)
{
int err;
- if ((ai->sndio.hdl = sio_open(ai->sndio.device, SIO_REC, 0)) == NULL) {
+ const char *device = ai->sndio.device;
+ if (!device)
+ device = "default";
+ if ((ai->sndio.hdl = sio_open(device, SIO_REC, 0)) == NULL) {
MP_ERR(ai, "could not open sndio audio");
return -1;
}