[Live-devel] memory leak in MultiFrameRTPSource on fSavedPacket

David BERTRAND bidibulle at operamail.com
Wed Oct 11 05:57:25 PDT 2006


Ross,
We further investigated this (very complex) issue and finally found 
what happens.
Everything is fine when the packet buffer always contain one single 
packet (common case, only "fSavedPacket" in the queue).
However, if a second packet comes in the list, we have 
"fSavedPacket" and another packet that I will call "second packet" 
in the list.
If "sink->stopPlaying()" occurs between delivery of "fSavedPacket" 
(to the sink) and delivery of "second packet", then 
"ReorderingPacketBiffer:reset()" method doesn't delete 
"fSavedPacket" because :
- "fHeadPacket" is not NULL ("second packet" is still in the queue)
- and "fSavedPacket" is not in the list anymore.
Do you see now the problem ? FYI each memory loss is 10KB size.
We tried to fix this in the attached patch, without removing your 
optimization algorithm. We added a boolean "fSavedPacketFree" to 
know whether "fSavedPacket" is in the queue.
Thank you in advance for your feedback on this.
David


-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com

Powered by Outblaze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MultiFramedRTPSource.cpp.patch
Type: application/octet-stream
Size: 2549 bytes
Desc: not available
Url : http://lists.live555.com/pipermail/live-devel/attachments/20061011/df86b848/attachment.obj 


More information about the live-devel mailing list