[vlc-commits] Fix memory leak in video_output on Mac OS X (close #6267)

Naohiro KORIYAMA git at videolan.org
Tue Feb 28 19:15:00 CET 2012


vlc | branch: master | Naohiro KORIYAMA <nkoriyama at gmail.com> | Tue Feb 28 10:32:07 2012 +0900| [06430f7c2468d5f8004bad8c7ff146d5a1dcebbb] | committer: Felix Paul Kühne

Fix memory leak in video_output on Mac OS X (close #6267)

huge numbers of memory leaks happens because subpictures are not deleted.

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=06430f7c2468d5f8004bad8c7ff146d5a1dcebbb
---

 modules/video_output/macosx.m |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 91ffdfd..1537325 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -302,7 +302,8 @@ static void PictureDisplay(vout_display_t *vd, picture_t *pic, subpicture_t *sub
     picture_Release (pic);
     sys->has_first_frame = true;
 
-    (void)subpicture;
+    if (subpicture)
+        subpicture_Delete(subpicture);
 }
 
 static int Control (vout_display_t *vd, int query, va_list ap)



More information about the vlc-commits mailing list