Changeset 3449


Ignore:
Timestamp:
Mar 15, 2011 11:25:00 AM (14 years ago)
Author:
bennylp
Message:

Re #1208 (misc): bug in frame_size calculation in PJMEDIA_FSZ() causing results to be truncated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/format.h

    r3425 r3449  
    463463{ 
    464464#if PJ_HAS_INT64 
    465     return ((unsigned)(bps * usec_ptime / PJ_UINT64(8000000))); 
     465    return ((unsigned)((pj_uint64_t)bps * usec_ptime / PJ_UINT64(8000000))); 
    466466#elif PJ_HAS_FLOATING_POINT 
    467     return ((unsigned)(bps * usec_ptime / 8000000.0)); 
     467    return ((unsigned)(1.0 * bps * usec_ptime / 8000000.0)); 
    468468#else 
    469469    return ((unsigned)(bps / 8L * usec_ptime / 1000000)); 
Note: See TracChangeset for help on using the changeset viewer.