[MPlayer-dev-eng] [PATCH] vo_macosx: shared_buffer, autorelease more often

Adrian Stutz adrian at sttz.ch
Thu Apr 9 18:10:38 CEST 2009


Hello,

Currently, when mplayer is used as a backend for MPlayer OSX (with
shared_buffer), the mplayer process uses more and more memory as a movie is
played (e.g. starting out at 44MB and using 60MB after 5 minutes).

The problem are autoreleased Objective-C objects created in the Core
Foundation classes. There is an autorelease pool in place but it only gets
emptied when mplayer closes. Attached patch creates an additional
autorelease pool in flip_page, where the NSConnection call is responsible
for creating the autoreleased objects.

I'm not sure how to best place the autorelease pool. Is it ok to create one
in each flip_page? Quick benchmarks haven't shown any performance hit.

Greetings
Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vo_macosx_memory_leak.patch
Type: application/octet-stream
Size: 471 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090409/e63e1d8d/attachment.obj>


More information about the MPlayer-dev-eng mailing list