Fixed minor bug that mangled timestamps of 1st and 2nd packets.

git-svn-id: http://voip.null.ro/svn/yate@702 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2006-02-24 15:45:35 +00:00
parent 417ed08bb6
commit 1e3e20fbba
2 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ public:
if (getTransSource()) {
DataBlock oblock;
if (oblock.convert(data, m_format, getTransSource()->getFormat())) {
if (!tStamp) {
if (tStamp == (unsigned long)-1) {
unsigned int delta = data.length();
if (delta > oblock.length())
delta = oblock.length();
@ -229,7 +229,7 @@ void DataSource::Forward(const DataBlock& data, unsigned long tStamp)
return;
}
// no timestamp provided - try to guess
if (!tStamp) {
if (tStamp == (unsigned long)-1) {
tStamp = m_timestamp;
const FormatInfo* f = m_format.getInfo();
if (f)

View File

@ -388,7 +388,7 @@ public:
* @param data The raw data block to forward; an empty block ends data
* @param tStamp Timestamp of data - typically samples
*/
void Forward(const DataBlock& data, unsigned long tStamp = 0);
void Forward(const DataBlock& data, unsigned long tStamp = (unsigned long)-1);
/**
* Attach a data consumer