[vlc-devel] [PATCH 2/2] Fix memory leak when using subtitles with VDPAU
Devin Heitmueller
dheitmueller at kernellabs.com
Sun Sep 21 18:54:55 CEST 2014
When rendering closed captions with VDPAU, nothing frees the subpicture,
causing a leak that bleeds all the memory out of the system within
minutes.
---
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)
--
1.9.1
More information about the vlc-devel
mailing list