diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2011-08-18 04:57:42 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2011-08-18 04:57:42 +0000 |
commit | f8b6153e92a2e84b1033c9d0dcfe46bf6470346e (patch) | |
tree | 16526adc4b89156c7806659440ecd1d890096c36 /pjmedia | |
parent | 241e7a9e37cdf313a2e33cc1c97a4fe66baa79b1 (diff) |
Fix #1345: Fixed samples-per-frame calculation formula bug in PJMEDIA_SPF().
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3709 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r-- | pjmedia/include/pjmedia/format.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pjmedia/include/pjmedia/format.h b/pjmedia/include/pjmedia/format.h index ac9fdb93..418edf68 100644 --- a/pjmedia/include/pjmedia/format.h +++ b/pjmedia/include/pjmedia/format.h @@ -441,11 +441,11 @@ PJ_INLINE(unsigned) PJMEDIA_SPF(unsigned clock_rate, unsigned usec_ptime, { #if PJ_HAS_INT64 return ((unsigned)((pj_uint64_t)usec_ptime * \ - clock_rate / channel_count / 1000000)); + clock_rate * channel_count / 1000000)); #elif PJ_HAS_FLOATING_POINT - return ((unsigned)(1.0*usec_ptime * clock_rate / channel_count / 1000000)); + return ((unsigned)(1.0*usec_ptime * clock_rate * channel_count / 1000000)); #else - return ((unsigned)(usec_ptime / 1000L * clock_rate / \ + return ((unsigned)(usec_ptime / 1000L * clock_rate * \ channel_count / 1000)); #endif } |