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/