Changeset 4879 for pjproject/trunk/pjmedia/src/pjmedia-audiodev/audiodev.c
- Timestamp:
- Jul 16, 2014 4:21:54 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-audiodev/audiodev.c
r4435 r4879 276 276 pj_status_t status; 277 277 278 if (!refresh ) {278 if (!refresh && drv->create) { 279 279 /* Create the factory */ 280 280 f = (*drv->create)(aud_subsys.pf); … … 291 291 f = drv->f; 292 292 } 293 294 if (!f) 295 return PJ_EUNKNOWN; 293 296 294 297 /* Get number of devices */ … … 312 315 313 316 /* Fill in default devices */ 314 drv->play_dev_idx = drv->rec_dev_idx = drv->dev_idx = -1; 317 drv->play_dev_idx = drv->rec_dev_idx = 318 drv->dev_idx = PJMEDIA_AUD_INVALID_DEV; 315 319 for (i=0; i<dev_cnt; ++i) { 316 320 pjmedia_aud_dev_info info; … … 375 379 } 376 380 377 drv->dev_cnt = 0; 378 drv->play_dev_idx = drv->rec_dev_idx = drv->dev_idx = -1; 381 pj_bzero(drv, sizeof(*drv)); 382 drv->play_dev_idx = drv->rec_dev_idx = 383 drv->dev_idx = PJMEDIA_AUD_INVALID_DEV; 379 384 } 380 385 … … 492 497 493 498 deinit_driver(i); 494 pj_bzero(drv, sizeof(*drv));495 499 return PJ_SUCCESS; 496 500 }
Note: See TracChangeset
for help on using the changeset viewer.