I have noticed that VLC begins consuming excessive amounts of memory when being used as a streaming server (400 MB/hr) and does not free it until it shuts down.
System Setup:
Debian Sarge
vlc-0.8.1*
ffmpeg-0.4.9-pre1*
*Both compiled with options given on http://sourceforge.net/docman/display_d ... _id=127846
MythStreamTV comes with a script that launches vlc to do the streaming. From that point on, VLC begins consuming memory at the rate of approximately 400 MB/hr when run with the following options:
This is how said script calls VLC:
/usr/local/bin/vlc -I http --http-host=:8002 --sout-transcode-fps=$FPS
--sout-transcode-deinterlace $1 ":sout=#transcode{vcodec=$VCODEC,acodec=$ACODEC,
vb=$VB,ab=$AB,scale=$SIZE}:std{access=mmsh,mux=asfh,url=:8001}"
Now, I modified this script so that instead of launching VLC, it launches VLC under valgrind with the --trace-children=yes and --leak-check=full options set, and the following is a subset of the output given when the program terminated:
==23763== 7745360 bytes in 403 blocks are possibly lost in loss record 86 of 86
==23763== at 0x1B90459D: malloc (vg_replace_malloc.c:130)
==23763== by 0x806EC2C: __block_New (block.c:54)
==23763== by 0x1D2E78B5: ParseMPEGBlock (vlc_block.h:221)
==23763== by 0x1D2E6CA8: Packetize (mpegvideo.c:289)
==23763== by 0x808BB6D: DecoderDecode (decoder.c:599)
==23763== by 0x808E563: EsOutSend (es_out.c:765)
==23763== by 0x1D28BDE2: Demux (vlc_es_out.h:96)
==23763== by 0x8056CF6: Run (input.c:340)
==23763== by 0x1B933E50: pthread_start_thread (in /lib/libpthread-0.10.so)
==23763== by 0x1BC4A6E9: clone (in /lib/libc-2.3.2.so)
==23763== LEAK SUMMARY:
==23763== definitely lost: 96745 bytes in 13 blocks.
==23763== indirectly lost: 120 bytes in 10 blocks.
==23763== possibly lost: 7745360 bytes in 403 blocks.
==23763== still reachable: 770879 bytes in 5271 blocks.
==23763== suppressed: 0 bytes in 0 blocks.
I suspect there is either some sort of memory leak, or that VLC is simply storing and keeping pointers to a very large, and probably unnecessary, amount of memory.