[vlc-commits] Fix memory leak when using subtitles with VDPAU
Devin Heitmueller
git at videolan.org
Mon Sep 22 23:43:55 CEST 2014
vlc/vlc-2.2 | branch: master | Devin Heitmueller <dheitmueller at kernellabs.com> | Sun Sep 21 12:54:55 2014 -0400| [3b8f453114d554357ad086a49297073a0f7e9dc7] | committer: Jean-Baptiste Kempf
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 <remi at remlab.net>
(cherry picked from commit 89089ebc9f7625b7317262803394d96139325e54)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=3b8f453114d554357ad086a49297073a0f7e9dc7
---
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 3355d7e..68000b7 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)
More information about the vlc-commits
mailing list