Changeset 2565 for pjproject/trunk/pjmedia/src/pjmedia-codec/g7221.c
- Timestamp:
- Apr 2, 2009 10:41:22 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-codec/g7221.c
r2563 r2565 501 501 pjmedia_codec_info codecs[]) 502 502 { 503 unsigned i ;503 unsigned i, max_cnt; 504 504 505 505 PJ_ASSERT_RETURN(factory==&codec_factory.base, PJ_EINVAL); 506 506 PJ_ASSERT_RETURN(codecs && *count > 0, PJ_EINVAL); 507 507 508 *count = PJ_MIN(*count, codec_factory.mode_count); 508 max_cnt = *count; 509 *count = 0; 509 510 510 for (i=0; i<*count; ++i) { 511 for (i=0; (i < codec_factory.mode_count) && (*count < max_cnt); ++i) 512 { 511 513 if (!codec_factory.modes[i].enabled) 512 514 continue; 513 515 514 pj_bzero(&codecs[i], sizeof(pjmedia_codec_info)); 515 codecs[i].encoding_name = pj_str((char*)CODEC_TAG); 516 codecs[i].pt = codec_factory.modes[i].pt; 517 codecs[i].type = PJMEDIA_TYPE_AUDIO; 518 codecs[i].clock_rate = codec_factory.modes[i].sample_rate; 519 codecs[i].channel_cnt = 1; 516 pj_bzero(&codecs[*count], sizeof(pjmedia_codec_info)); 517 codecs[*count].encoding_name = pj_str((char*)CODEC_TAG); 518 codecs[*count].pt = codec_factory.modes[i].pt; 519 codecs[*count].type = PJMEDIA_TYPE_AUDIO; 520 codecs[*count].clock_rate = codec_factory.modes[i].sample_rate; 521 codecs[*count].channel_cnt = 1; 522 523 ++ *count; 520 524 } 521 525
Note: See TracChangeset
for help on using the changeset viewer.