[Opalvoip-svn] SF.net SVN: opalvoip: [19852] opal/trunk/src/opal/patch.cxx
Brought to you by:
csoutheren,
rjongbloed
From: <cso...@us...> - 2008-03-31 06:08:21
|
Revision: 19852 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=19852&view=rev Author: csoutheren Date: 2008-03-30 23:08:26 -0700 (Sun, 30 Mar 2008) Log Message: ----------- Make sure Comfort Noise packets aren't mistaken for PCM data Modified Paths: -------------- opal/trunk/src/opal/patch.cxx Modified: opal/trunk/src/opal/patch.cxx =================================================================== --- opal/trunk/src/opal/patch.cxx 2008-03-31 05:53:32 UTC (rev 19851) +++ opal/trunk/src/opal/patch.cxx 2008-03-31 06:08:26 UTC (rev 19852) @@ -515,12 +515,14 @@ } -static bool CannotTranscodeFrame(const OpalTranscoder & codec, const RTP_DataFrame & frame) +static bool CannotTranscodeFrame(const OpalTranscoder & codec, RTP_DataFrame & frame) { if (!codec.AcceptComfortNoise()) { RTP_DataFrame::PayloadTypes pt = frame.GetPayloadType(); - if (pt == RTP_DataFrame::CN || pt == RTP_DataFrame::Cisco_CN) + if (pt == RTP_DataFrame::CN || pt == RTP_DataFrame::Cisco_CN) { + frame.SetPayloadSize(0); // remove the payload because the transcoder has indicated it won't understand it return true; + } } if (!codec.AcceptEmptyPayload() && frame.GetPayloadSize() == 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |