bug fix
This commit is contained in:
parent
148841d924
commit
5052ec6f14
3 changed files with 4 additions and 6 deletions
|
@ -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 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue