Ignore:
Timestamp:
May 27, 2011 7:28:28 AM (14 years ago)
Author:
bennylp
Message:

Fixed #1301: Wrong alaw value is generated by the non-table version of pjmedia_linear2alaw() function for some specific PCM values (thanks K. Johnson for the fix)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjmedia/src/pjmedia/alaw_ulaw.c

    r1417 r3575  
    129129                mask = 0x55;            /* sign bit = 0 */ 
    130130                pcm_val = -pcm_val - 8; 
     131 
     132                /* https://trac.pjsip.org/repos/ticket/1301  
     133                 * Thank you K Johnson - Zetron - 27 May 2011 
     134                 */ 
     135                if (pcm_val < 0) 
     136                    pcm_val = 0; 
    131137        } 
    132138 
Note: See TracChangeset for help on using the changeset viewer.