[Ffmpeg-devel] [PATCH] Fix leak of AVPacket data in ffserver
Mon Jan 23 23:34:58 CET 2006
I was noticing that ffserver memory usage steadily grows over time.
There are a couple reasons for this, but here is the big one. When in
the HTTPSTATE_SEND_DATA state, we're basically in a
av_read_frame()/av_write_frame() loop. If the av_write_frame doesn't
need a flush (which is the case when writing low bitrate [96kbit] asf
streams), nothing is written to the dynbuff and the code loops back to
read more frames to fill the outgoing buffer. In this case however, the
data attached to the AVPacket is not freed with a call to av_free_packet.
This patch fixes that in the common case as well as in the case a
dynbuff could not be allocated. NOTE: This patch must be applied
*after* my ffserver_warning_clean2.diff patch.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the ffmpeg-devel