npapi-vlc | branch: master | Tim Lammens <[email protected]> | Sat Jan 25 15:46:16 2014 +0100| [8cb00d38282968587f89c016ceca59fb582fc6cb] | committer: Felix Paul Kühne
macosx: fix memory leak in windowless plugin Signed-off-by: Felix Paul Kühne <[email protected]> > http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=8cb00d38282968587f89c016ceca59fb582fc6cb --- npapi/vlcwindowless_mac.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/npapi/vlcwindowless_mac.cpp b/npapi/vlcwindowless_mac.cpp index 8c75aae..26da75a 100644 --- a/npapi/vlcwindowless_mac.cpp +++ b/npapi/vlcwindowless_mac.cpp @@ -207,6 +207,7 @@ bool VlcWindowlessMac::handle_event(void *event) kCGRenderingIntentPerceptual); CGDataProviderRelease(dataProvider); + CFRelease(dataRef); if (!lastFrame) { fprintf(stderr, "image creation failed\n"); @@ -223,7 +224,10 @@ bool VlcWindowlessMac::handle_event(void *event) rect = CGRectMake(left, top, cached_width, cached_width); } - CGContextDrawImage(cgContext, rect, lastFrame); + if(lastFrame) { + CGContextDrawImage(cgContext, rect, lastFrame); + CGImageRelease(lastFrame); + } CGContextRestoreGState(cgContext); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
