Hi Paul,

Thanks for your patch, it looks correct.
But, could you, please, re-generate it with "svn diff <path-to-file>",
or, at least, use unified diff and correct diff direction (e.g.
run "diff -uprN <old-file> <new-file>". Also it would be great
if you followed formating style and didn't use spaces instead
of tabs. sipX is crossplatform and should looks good everywhere,
so tabs are prohibited.


On Thu, Nov 27, 2008 at 3:12 AM, Paul Whitfield
<[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have found an issue with the GSM codec and a device that
> sent multiple frames in a single RTP packet (which is valid).
>
> The plug-in will return an error if the coded packet size
> was not equal to 33 (a single 20 millisecond frame).
>
> Attached is a patch that fixes this so that
> it can cope with more than a single frame in a packet.
> It still checks to ensure the packet contains a multiple of 33 bytes.
>
> Enjoy.
>
> --
> Regards
>
> Paul Whitfield
> Software Engineer
>
> 15 Hector St Osborne Park
> Perth WA 6017
> P:  +61 8 9445 2633
> F:  +61 8 9445 1687
> I: www.omnitronics.com.au <http://www.omnitronics.com.au>
>
>  Please consider the environment before printing this email.
> This message and any attachment are confidential. If you are not the
> intended recipient, please telephone or email the sender and delete the
> message and any attachment from your system. If you are not the intended
> recipient you must not copy this message or attachment or disclose the
> contents to any other person.
>
>
> 122,126d121
> <    gsm_byte *pIn = (gsm_byte * ) pCodedData;
> <    gsm_signal *pOut = ( gsm_signal * ) pAudioBuffer;
> <    unsigned outSize   = ( cbCodedPacketSize / 33 ) * 160;
> <    unsigned remaining = cbCodedPacketSize;
> <
> 129c124
> <    if ( (cbCodedPacketSize % 33) != 0 )
> ---
>>    if (cbCodedPacketSize != 33)
> 134c129
> <    if (cbBufferSize < outSize )
> ---
>>    if (cbBufferSize < 160)
> 139,147c134,135
> <    while ( remaining > 0 )
> <    {
> <            gsm_decode(mpGsm->mpGsmState, pIn, pOut);
> <                pIn += 33;
> <                pOut +=160;
> <                remaining -= 33;
> <    }
> <
> <    *pcbDecodedSize = outSize;
> ---
>>    gsm_decode(mpGsm->mpGsmState, (gsm_byte*)pCodedData,
>> (gsm_signal*)pAudioBuffer);
>>    *pcbDecodedSize = 160;
>
> _______________________________________________
> sipxtapi-dev mailing list
> [email protected]
> List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
>



-- 
Regards,
Alexander Chemeris.

SIPez LLC.
SIP VoIP, IM and Presence Consulting
http://www.SIPez.com
tel: +1 (617) 273-4000
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to