Fixing bug in re-packing of stereo packets.
BUG=341 TEST=voe_cmd_test, run G.722. First modify /src/modules/audio_coding_main/source/acm_codec_database.cc @@ -149,7 +149,7 @@ const CodecInst ACMCodecDB::database_[] = { {kDynamicPayloadtypes[count_database++], "CELT", 32000, 320, 2, 64000}, #endif #ifdef WEBRTC_CODEC_G722 - {9, "G722", 16000, 320, 1, 64000}, + {9, "G722", 16000, 320, 2, 64000}, #endif #ifdef WEBRTC_CODEC_G722_1 Review URL: https://webrtc-codereview.appspot.com/454001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1930 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
3e820e5109
commit
c231e4cb03
@ -449,7 +449,7 @@ RTPReceiverAudio::ParseAudioCodecSpecific(WebRtcRTPHeader* rtpHeader,
|
||||
WebRtc_UWord16 s = payloadData[offsetBytes] << 8;
|
||||
|
||||
// check that we don't read outside the memory
|
||||
if(offsetBytes < (WebRtc_UWord32)payloadLength -2)
|
||||
if(offsetBytes < (WebRtc_UWord32)payloadLength - 1)
|
||||
{
|
||||
s += payloadData[offsetBytes+1];
|
||||
}
|
||||
@ -463,8 +463,8 @@ RTPReceiverAudio::ParseAudioCodecSpecific(WebRtcRTPHeader* rtpHeader,
|
||||
offsetSamples += audioSpecific.bitsPerSample;
|
||||
if(readShift <= audioSpecific.bitsPerSample)
|
||||
{
|
||||
// next does not fitt
|
||||
// or fitt exactly
|
||||
// next does not fit
|
||||
// or fit exactly
|
||||
offsetSamples -= 8;
|
||||
offsetBytes++;
|
||||
}
|
||||
@ -485,8 +485,8 @@ RTPReceiverAudio::ParseAudioCodecSpecific(WebRtcRTPHeader* rtpHeader,
|
||||
offsetSamplesInsert += audioSpecific.bitsPerSample;
|
||||
if(insertShift <= audioSpecific.bitsPerSample)
|
||||
{
|
||||
// next does not fitt
|
||||
// or fitt exactly
|
||||
// next does not fit
|
||||
// or fit exactly
|
||||
offsetSamplesInsert -= 8;
|
||||
offsetBytesInsert++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user