Ticket #768: Media initialization returns error if no audio device is detected
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2570 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjmedia/src/pjmedia-audiodev/audiodev.c b/pjmedia/src/pjmedia-audiodev/audiodev.c
index 8bf1f79..21c4b3d 100644
--- a/pjmedia/src/pjmedia-audiodev/audiodev.c
+++ b/pjmedia/src/pjmedia-audiodev/audiodev.c
@@ -261,10 +261,16 @@
aud_subsys.dev_cnt + dev_cnt - MAX_DEVS));
dev_cnt = MAX_DEVS - aud_subsys.dev_cnt;
}
+
+ /* enabling this will cause pjsua-lib initialization to fail when there
+ * is no sound device installed in the system, even when pjsua has been
+ * run with --null-audio
+ *
if (dev_cnt == 0) {
f->op->destroy(f);
return PJMEDIA_EAUD_NODEV;
}
+ */
/* Fill in default devices */
drv->play_dev_idx = drv->rec_dev_idx = drv->dev_idx = -1;