Changeset 429
- Timestamp:
- May 2, 2006 5:51:04 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/g711.c
r411 r429 33 33 #define G711_BPS 64000 34 34 #define G711_CODEC_CNT 0 /* number of codec to preallocate in memory */ 35 #define PTIME 20 36 #define FRAME_SIZE (8000 * PTIME / 1000) 35 37 36 38 /* These are the only public functions exported to applications */ … … 230 232 attr->avg_bps = G711_BPS; 231 233 attr->pcm_bits_per_sample = 16; 232 attr->ptime = 20;234 attr->ptime = PTIME; 233 235 attr->pt = id->pt; 234 236 … … 371 373 PJ_ASSERT_RETURN(frame_cnt, PJ_EINVAL); 372 374 373 while (pkt_size >= 160&& count < *frame_cnt) {375 while (pkt_size >= FRAME_SIZE && count < *frame_cnt) { 374 376 frames[0].type = PJMEDIA_FRAME_TYPE_AUDIO; 375 377 frames[0].buf = pkt; 376 frames[0].size = 160;377 378 pkt = ((char*)pkt) + 160;379 pkt_size -= 160;378 frames[0].size = FRAME_SIZE; 379 380 pkt = ((char*)pkt) + FRAME_SIZE; 381 pkt_size -= FRAME_SIZE; 380 382 381 383 ++count;
Note: See TracChangeset
for help on using the changeset viewer.