Changeset 3380 for pjproject/trunk
- Timestamp:
- Dec 2, 2010 6:12:19 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/codec.c
r3116 r3380 536 536 unsigned i; 537 537 pjmedia_codec_id codec_id; 538 pj_pool_t *pool ;538 pj_pool_t *pool, *old_pool = NULL; 539 539 struct pjmedia_codec_desc *codec_desc = NULL; 540 540 pjmedia_codec_default_param *p; … … 561 561 } 562 562 563 /* If codec param is previously set, release codec param pool */ 563 /* If codec param is previously set, reset the codec param but release 564 * the codec param pool later after the new param is set (ticket #1171). 565 */ 564 566 if (codec_desc->param) { 565 567 pj_assert(codec_desc->param->pool); 566 pj_pool_release(codec_desc->param->pool);568 old_pool = codec_desc->param->pool; 567 569 codec_desc->param = NULL; 568 570 } … … 573 575 if (NULL == param) { 574 576 pj_mutex_unlock(mgr->mutex); 577 if (old_pool) 578 pj_pool_release(old_pool); 575 579 return PJ_SUCCESS; 576 580 } … … 591 595 ¶m->setting.dec_fmtp.param[i].val); 592 596 } 593 for (i = 0; i < param->setting.dec_fmtp.cnt; ++i) { 594 pj_strdup(pool, &p->param->setting.dec_fmtp.param[i].name, 595 ¶m->setting.dec_fmtp.param[i].name); 596 pj_strdup(pool, &p->param->setting.dec_fmtp.param[i].val, 597 ¶m->setting.dec_fmtp.param[i].val); 598 } 599 600 pj_mutex_unlock(mgr->mutex); 597 for (i = 0; i < param->setting.enc_fmtp.cnt; ++i) { 598 pj_strdup(pool, &p->param->setting.enc_fmtp.param[i].name, 599 ¶m->setting.enc_fmtp.param[i].name); 600 pj_strdup(pool, &p->param->setting.enc_fmtp.param[i].val, 601 ¶m->setting.enc_fmtp.param[i].val); 602 } 603 604 pj_mutex_unlock(mgr->mutex); 605 606 if (old_pool) 607 pj_pool_release(old_pool); 601 608 602 609 return PJ_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.