[FFmpeg-devel] [PATCH] lavd/xv: Free graphics context
Lukasz Marek
lukasz.m.luki at gmail.com
Fri Nov 1 13:20:15 CET 2013
Valgrind detects mem leak from XCreateGC.
Free it with XFreeGC.
Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>
---
libavdevice/xv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavdevice/xv.c b/libavdevice/xv.c
index 65f2f72..3b377f8 100644
--- a/libavdevice/xv.c
+++ b/libavdevice/xv.c
@@ -181,6 +181,7 @@ static int xv_write_trailer(AVFormatContext *s)
XShmDetach(xv->display, &xv->yuv_shminfo);
shmdt(xv->yuv_image->data);
XFree(xv->yuv_image);
+ XFreeGC(xv->display, xv->gc);
XCloseDisplay(xv->display);
return 0;
}
--
1.7.10.4
More information about the ffmpeg-devel
mailing list