Fixed the timestamp adjusting condition.

git-svn-id: http://yate.null.ro/svn/yate/trunk@5185 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2012-07-06 11:53:23 +00:00
parent 945e1441e3
commit fb276938aa
4 changed files with 4 additions and 4 deletions

View File

@ -92,7 +92,7 @@ unsigned long GsmCodec::Consume(const DataBlock& data, unsigned long tStamp, uns
if (data.null() && (flags & DataSilent))
return getTransSource()->Forward(data,tStamp,flags);
ref();
if (m_encoding && tStamp && !m_data.null())
if (m_encoding && (tStamp != invalidStamp()) && !m_data.null())
tStamp -= (m_data.length() / 2);
m_data += data;
int frames,consumed;

View File

@ -134,7 +134,7 @@ unsigned long iLBCCodec::Consume(const DataBlock& data, unsigned long tStamp, un
block = BLOCKL_30MS;
no_bytes=NO_OF_BYTES_30MS;
}
if (m_encoding && tStamp && !m_data.null())
if (m_encoding && (tStamp != invalidStamp()) && !m_data.null())
tStamp -= (m_data.length() / 2);
m_data += data;
int frames,consumed;

View File

@ -189,7 +189,7 @@ unsigned long iLBCwrCodec::Consume(const DataBlock& data, unsigned long tStamp,
block = BLOCKL_30MS;
no_bytes = NO_OF_BYTES_30MS;
}
if (m_encoding && tStamp && !m_data.null())
if (m_encoding && (tStamp != invalidStamp()) && !m_data.null())
tStamp -= (m_data.length() / 2);
m_data += data;
// WebRTC will modify in-place the input data block!!!

View File

@ -179,7 +179,7 @@ unsigned long SpeexCodec::Consume(const DataBlock& data, unsigned long tStamp, u
if (!ref())
return 0;
if (m_encoding && tStamp && !m_data.null())
if (m_encoding && (tStamp != invalidStamp()) && !m_data.null())
tStamp -= (m_data.length() / 2);
m_data += data;
DataBlock outdata;