- Timestamp:
- May 30, 2007 7:31:46 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/pjproject-0.5-stable/pjmedia/src/pjmedia/wav_player.c
r974 r1322 205 205 ptime = 20; 206 206 207 /* Normalize buff_size */ 208 if (buff_size < 1) buff_size = PJMEDIA_FILE_PORT_BUFSIZE; 209 210 207 211 /* Create fport instance. */ 208 212 fport = create_file_port(pool); … … 345 349 /* Create file buffer. 346 350 */ 347 if (buff_size < 1) buff_size = PJMEDIA_FILE_PORT_BUFSIZE;348 351 fport->bufsize = buff_size; 349 352 353 354 /* samples_per_frame must be smaller than bufsize (because get_frame() 355 * doesn't handle this case). 356 */ 357 if (fport->base.info.samples_per_frame * BYTES_PER_SAMPLE >= 358 fport->bufsize) 359 { 360 pj_file_close(fport->fd); 361 return PJ_EINVAL; 362 } 350 363 351 364 /* Create buffer. */ … … 539 552 return PJ_SUCCESS; 540 553 } 554
Note: See TracChangeset
for help on using the changeset viewer.