Changeset 2272 for pjproject/trunk


Ignore:
Timestamp:
Sep 11, 2008 10:17:10 AM (16 years ago)
Author:
nanang
Message:

Ticket #614: Fixed compilation warning of integer conversions.

Location:
pjproject/trunk/pjmedia/src/pjmedia
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/wav_player.c

    r2270 r2272  
    265265 
    266266    fport->fmt_tag = wave_hdr.fmt_hdr.fmt_tag; 
    267     fport->bytes_per_sample = wave_hdr.fmt_hdr.bits_per_sample / 8; 
     267    fport->bytes_per_sample = (pj_uint16_t)  
     268                              (wave_hdr.fmt_hdr.bits_per_sample / 8); 
    268269 
    269270    /* If length of fmt_header is greater than 16, skip the remaining 
  • pjproject/trunk/pjmedia/src/pjmedia/wav_writer.c

    r2270 r2272  
    125125    wave_hdr.fmt_hdr.fmt = PJMEDIA_FMT_TAG; 
    126126    wave_hdr.fmt_hdr.len = 16; 
    127     wave_hdr.fmt_hdr.fmt_tag = fport->fmt_tag; 
     127    wave_hdr.fmt_hdr.fmt_tag = (pj_uint16_t)fport->fmt_tag; 
    128128    wave_hdr.fmt_hdr.nchan = (pj_int16_t)channel_count; 
    129129    wave_hdr.fmt_hdr.sample_rate = sampling_rate; 
    130130    wave_hdr.fmt_hdr.bytes_per_sec = sampling_rate * channel_count *  
    131131                                     fport->bytes_per_sample; 
    132     wave_hdr.fmt_hdr.block_align = fport->bytes_per_sample * channel_count; 
    133     wave_hdr.fmt_hdr.bits_per_sample = fport->bytes_per_sample * 8; 
     132    wave_hdr.fmt_hdr.block_align = (pj_uint16_t) 
     133                                   (fport->bytes_per_sample * channel_count); 
     134    wave_hdr.fmt_hdr.bits_per_sample = (pj_uint16_t) 
     135                                       (fport->bytes_per_sample * 8); 
    134136 
    135137    wave_hdr.data_hdr.data = PJMEDIA_DATA_TAG; 
Note: See TracChangeset for help on using the changeset viewer.