[MPlayer-dev-eng] [PATCH] memory leak in vo_macosx

Guillaume POIRIER poirierg at gmail.com
Fri Apr 10 09:57:30 CEST 2009


Hello,

On Thu, Apr 9, 2009 at 11:38 PM, Alexander Strange
<astrange at ithinksw.com> wrote:
>
> On Apr 9, 2009, at 5:30 PM, Guillaume POIRIER wrote:
>
>> Hello,
>>
>> 2009/4/9 Alexander Strange <astrange at ithinksw.com>:
>>>
>>> vo_macosx leaks ~80 bytes with each call to flip_page, because this line:
>>>       error = CVOpenGLTextureCacheCreateTextureFromImage(NULL,
>>> textureCache, frameBuffers[image_page], 0, &texture);
>>>
>>> overwrites 'texture' without freeing the old one first (checked with
>>> 'leaks'). I'm not sure when this started happening. Attached patch fixes
>>> it
>>> by releasing the old texture.
>>
>> Thanks for the patch, but have you tested it before submitting it? I
>> doesn't compile! Attached patch has the changes your meant.
>> I've tested it on several videos, and confirmed that it didn't cause
>> any regression, but I'd like to use it more one real world usage to
>> confirm it does work as expected.
>
> How didn't it compile? I did accidentally introduce a whitespace change, so
> I should've read the diff output again, but aside from that they're the same
> change (and both work for me). Maybe you got a patch conflict applying it?

D'oh! I accidently hit ctrl+L on my emacs text editor while reading
the patch, that's why it wasn't working! :)

Sorry for the noise.

Guillaume
-- 
Only a very small fraction of our DNA does anything; the rest is all
comments and ifdefs.

Fred Allen  - &quot;Washington is no place for a good actor. The
competition from bad actors is too great.&quot; -
http://www.brainyquote.com/quotes/authors/f/fred_allen.html



More information about the MPlayer-dev-eng mailing list