Flush NetEQ when receiving payload type switches between mono and stereo.
TEST=voe_cmd_test Review URL: https://webrtc-codereview.appspot.com/448004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1893 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -669,7 +669,7 @@ ACMNetEQ::RecOut(
|
|||||||
|
|
||||||
// Check for errors that can be recovered from:
|
// Check for errors that can be recovered from:
|
||||||
// RECOUT_ERROR_SAMPLEUNDERRUN = 2003
|
// RECOUT_ERROR_SAMPLEUNDERRUN = 2003
|
||||||
int errorCode = WebRtcNetEQ_GetErrorCode(_inst[0]);
|
int errorCode = WebRtcNetEQ_GetErrorCode(_inst[1]);
|
||||||
if(errorCode != 2003)
|
if(errorCode != 2003)
|
||||||
{
|
{
|
||||||
// Cannot recover; return an error
|
// Cannot recover; return an error
|
||||||
|
|||||||
@@ -1842,6 +1842,13 @@ AudioCodingModuleImpl::IncomingPacket(
|
|||||||
_codecs[i]->UpdateDecoderSampFreq(i);
|
_codecs[i]->UpdateDecoderSampFreq(i);
|
||||||
_netEq.SetReceivedStereo(_stereoReceive[i]);
|
_netEq.SetReceivedStereo(_stereoReceive[i]);
|
||||||
|
|
||||||
|
// If we have a change in expected number of channels,
|
||||||
|
// flush packet buffers in NetEQ.
|
||||||
|
if ((_stereoReceive[i] && (_expected_channels == 1)) ||
|
||||||
|
(!_stereoReceive[i] && (_expected_channels == 2))) {
|
||||||
|
_netEq.FlushBuffers();
|
||||||
|
}
|
||||||
|
|
||||||
// Store number of channels we expect to receive for the
|
// Store number of channels we expect to receive for the
|
||||||
// current payload type.
|
// current payload type.
|
||||||
if (_stereoReceive[i]) {
|
if (_stereoReceive[i]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user