vlc | branch: master | Devin Heitmueller <[email protected]> | Sun 
Sep 21 12:54:55 2014 -0400| [89089ebc9f7625b7317262803394d96139325e54] | 
committer: Rémi Denis-Courmont

Fix memory leak when using subtitles with VDPAU

When rendering closed captions with VDPAU, nothing frees the subpicture,
causing a leak that bleeds all the memory out of the system within
minutes.

Signed-off-by: Rémi Denis-Courmont <[email protected]>

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

 modules/hw/vdpau/display.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/hw/vdpau/display.c b/modules/hw/vdpau/display.c
index e64fc5e..044ac33 100644
--- a/modules/hw/vdpau/display.c
+++ b/modules/hw/vdpau/display.c
@@ -315,7 +315,11 @@ static void Wait(vout_display_t *vd, picture_t *pic, 
subpicture_t *subpicture)
     }
 
     sys->current = pic;
-    (void) subpicture;
+
+    /* We already dealt with the subpicture in the Queue phase, so it's safe to
+       delete at this point */
+    if (subpicture)
+        subpicture_Delete(subpicture);
 }
 
 static int Control(vout_display_t *vd, int query, va_list ap)

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to