[Live-devel] fNumFramesUsedSoFar and MutiFramedRTPSink

Ross Finlayson finlayson at live555.com
Tue May 9 09:54:42 PDT 2006


At 08:04 AM 5/9/2006, you wrote:
>I noticed a problem with variable fNumFramesUsedSoFar when 
>MultiFramedRTPSink::ourHandleClosure() is called. In this case, 
>sendPacketIfNecessary() is called in case we have a partially built 
>packet to send. But variable fNumFramesUsedSoFar is only reset in 
>buildAndSendPacket function which in this case won't be done. IMO, 
>this reset should (also?) be done after really sending the packet, 
>i.e at the end of function sendPacketifNecessary, for example just 
>after incrementing SEQN. Otherwise, some "empty" packet may be sent 
>and SEQN will wrongly be incremented.
>Ross, do you agree with my analysis ?

Not really, because I think there would be a problem (with the 
current code) only if "ourHandleClosure()" were to get called twice 
in succession, which should never happen.  "ourHandleClosure()" gets 
called only as a result of the "getNextFrame()" call in 
"packFrame()", which in turn gets called only (eventually) as a 
result of a call to "buildAndSendPacket()", which is where 
"fNumFramesUsedSoFar" is reset to zero.  So, "ourHandleClosure" 
should never get called when "fNumFramesUsedSoFar" has an incorrect value.


	Ross Finlayson
	Live Networks, Inc. (LIVE555.COM)
	<http://www.live555.com/>



More information about the live-devel mailing list