This commit is contained in:
Volker Fischer 2009-07-31 18:53:40 +00:00
parent 148841d924
commit 5052ec6f14
3 changed files with 4 additions and 6 deletions

View file

@ -42,7 +42,8 @@ void CNetBuf::Init ( const int iNewBlockSize, const int iNewNumBlocks )
Clear ( CT_GET ); Clear ( CT_GET );
} }
bool CNetBuf::Put ( const CVector<uint8_t>& vecbyData ) bool CNetBuf::Put ( const CVector<uint8_t>& vecbyData,
const int iInSize )
{ {
#ifdef _DEBUG_ #ifdef _DEBUG_
static FILE* pFileBI = fopen("bufferin.dat", "w"); static FILE* pFileBI = fopen("bufferin.dat", "w");
@ -52,9 +53,6 @@ fflush(pFileBI);
bool bPutOK = true; bool bPutOK = true;
// get size of data to be added to the buffer
const int iInSize = vecbyData.Size();
// Check if there is not enough space available -> correct // Check if there is not enough space available -> correct
if ( GetAvailSpace() < iInSize ) if ( GetAvailSpace() < iInSize )
{ {

View file

@ -39,7 +39,7 @@ public:
void Init ( const int iNewBlockSize, const int iNewNumBlocks ); void Init ( const int iNewBlockSize, const int iNewNumBlocks );
int GetSize() { return iMemSize / iBlockSize; } int GetSize() { return iMemSize / iBlockSize; }
bool Put ( const CVector<uint8_t>& vecbyData ); bool Put ( const CVector<uint8_t>& vecbyData, const int iInSize );
bool Get ( CVector<uint8_t>& vecbyData ); bool Get ( CVector<uint8_t>& vecbyData );
protected: protected:

View file

@ -354,7 +354,7 @@ EPutDataStat CChannel::PutData ( const CVector<uint8_t>& vecbyData,
bIsAudioPacket = true; bIsAudioPacket = true;
// store new packet in jitter buffer // store new packet in jitter buffer
if ( SockBuf.Put ( vecbyData ) ) if ( SockBuf.Put ( vecbyData, iNumBytes ) )
{ {
eRet = PS_AUDIO_OK; eRet = PS_AUDIO_OK;
} }