Changeset 2728 for pjproject/trunk/pjmedia/src/pjmedia/conference.c
- Timestamp:
- Jun 1, 2009 1:56:09 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/conference.c
r2696 r2728 572 572 /* Create port zero for sound device. */ 573 573 status = create_sound_port(pool, conf); 574 if (status != PJ_SUCCESS) 574 if (status != PJ_SUCCESS) { 575 pjmedia_conf_destroy(conf); 575 576 return status; 577 } 576 578 577 579 /* Create mutex. */ 578 580 status = pj_mutex_create_recursive(pool, "conf", &conf->mutex); 579 if (status != PJ_SUCCESS) 581 if (status != PJ_SUCCESS) { 582 pjmedia_conf_destroy(conf); 580 583 return status; 584 } 581 585 582 586 /* If sound device was created, connect sound device to the … … 627 631 PJ_DEF(pj_status_t) pjmedia_conf_destroy( pjmedia_conf *conf ) 628 632 { 633 unsigned i, ci; 634 629 635 PJ_ASSERT_RETURN(conf != NULL, PJ_EINVAL); 630 636 … … 635 641 } 636 642 643 /* Destroy delay buf of all (passive) ports. */ 644 for (i=0, ci=0; i<conf->max_ports && ci<conf->port_cnt; ++i) { 645 struct conf_port *cport; 646 647 cport = conf->ports[i]; 648 if (!cport) 649 continue; 650 651 ++ci; 652 if (cport->delay_buf) { 653 pjmedia_delay_buf_destroy(cport->delay_buf); 654 cport->delay_buf = NULL; 655 } 656 } 657 637 658 /* Destroy mutex */ 638 pj_mutex_destroy(conf->mutex); 659 if (conf->mutex) 660 pj_mutex_destroy(conf->mutex); 639 661 640 662 return PJ_SUCCESS; … … 794 816 pj_status_t status; 795 817 818 PJ_LOG(1, (THIS_FILE, "This API has been deprecated since 1.3 and will " 819 "be removed in the future release!")); 820 796 821 PJ_ASSERT_RETURN(conf && pool, PJ_EINVAL); 797 822 … … 1122 1147 pj_assert(conf->connect_cnt > 0); 1123 1148 --conf->connect_cnt; 1149 } 1150 1151 /* Destroy pjmedia port if this conf port is passive port, 1152 * i.e: has delay buf. 1153 */ 1154 if (conf_port->delay_buf) { 1155 pjmedia_port_destroy(conf_port->port); 1156 conf_port->port = NULL; 1124 1157 } 1125 1158
Note: See TracChangeset
for help on using the changeset viewer.