Changeset 4931 for pjproject/trunk
- Timestamp:
- Sep 24, 2014 11:48:39 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-codec/g7221.c
r4930 r4931 376 376 pj_bool_t enabled) 377 377 { 378 pjmedia_codec_mgr *codec_mgr; 378 379 unsigned i; 379 380 … … 381 382 if (!validate_mode(sample_rate, bitrate)) 382 383 return PJMEDIA_CODEC_EINMODE; 384 385 /* Get codec manager */ 386 codec_mgr = pjmedia_endpt_get_codec_mgr(codec_factory.endpt); 387 if (!codec_mgr) 388 return PJMEDIA_CODEC_EFAILED; 383 389 384 390 /* Look up in factory modes table */ … … 388 394 { 389 395 codec_factory.modes[i].enabled = enabled; 396 397 /* Re-register G722.1 codec factory to update codec list */ 398 pjmedia_codec_mgr_unregister_factory(codec_mgr, 399 &codec_factory.base); 400 pjmedia_codec_mgr_register_factory(codec_mgr, 401 &codec_factory.base); 390 402 return PJ_SUCCESS; 391 403 } … … 413 425 mode->bitrate = bitrate; 414 426 pj_utoa(mode->bitrate, mode->bitrate_str); 427 428 /* Re-register G722.1 codec factory to update codec list */ 429 pjmedia_codec_mgr_unregister_factory(codec_mgr, 430 &codec_factory.base); 431 pjmedia_codec_mgr_register_factory(codec_mgr, 432 &codec_factory.base); 415 433 416 434 return PJ_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.