[vls-devel] Re: CVS Commit (tooney)

Jean-Paul Saman saman at natlab.research.philips.com
Thu Feb 27 09:13:28 CET 2003


Damien LUCAS wrote:
> cvs at videolan.org wrote:
> 
>>
>>   . Corrected some memory violations (using valgrind).
>>
>>     The C_TsPacket::BuildAdaptionField function was writing PCR 
>> incorrectly !
> 
> 
> Well, good job ! vls now runs wihtout any valgrind warning under linux.
> 
> But I just tested: it did not fix the Windows bug of 0.5.0 branch.
> 
> Under windows and only under windows, in netoutput.cpp, vls just 
> seqfaults during memcpy at line 254, does anybody has an idea about this 
> bug ?
> 
> 

Change the for loop at 252-254 to this code.

     // TS concatenation
     for(unsigned int iIndex = 0; iIndex < iPacketNumber; iIndex++)
     {
       int Offset = HeaderOffset + TS_PACKET_LEN * iIndex;
       ASSERT( (Offset + TS_PACKET_LEN) <= (RTP_HEADER_LEN + 
TS_PACKET_LEN * TS_IN_ETHER) );

       memcpy(m_ByteBuff + Offset, m_cTsBuff[iIndex], TS_PACKET_LEN);
     }
     // Send the data that were stored in the buffer
     int iRc = PrivateWriteTo(HeaderOffset + TS_PACKET_LEN * iPacketNumber);

     if(iRc != HeaderOffset + TS_IN_ETHER * TS_PACKET_LEN)
       m_iByteLost += HeaderOffset + TS_IN_ETHER * TS_PACKET_LEN - iRc;

Hopefully you'll get to see the ASSERT(), because it is likely that you 
run out of your buffer.

-- 
Kind greetings,

Jean-Paul Saman

Software Architect

e-mail (work): saman at natlab.research.philips.com
phone  (work): 040 27 42909
------------------------------------------------------------
Ordina TA,
Science Park Eindhoven 5602, Postbus 293, 5600 AG Eindhoven
e-mail : jean-paul.saman at ordina.nl
phone  : 040 2601200
fax    : 040 2601199


-- 
This is the vls-devel mailing-list, see http://www.videolan.org/streaming/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vls-devel mailing list