[FFmpeg-cvslog] lavd/xv: free graphics context

Lukasz Marek git at videolan.org
Fri Nov 1 16:32:42 CET 2013


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki at gmail.com> | Fri Nov  1 13:20:15 2013 +0100| [c617c669e9fce59905915c3ba1053f535add6a06] | committer: Stefano Sabatini

lavd/xv: free graphics context

Valgrind detects mem leak from XCreateGC.
Free it with XFreeGC.

Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>
Signed-off-by: Stefano Sabatini <stefasab at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c617c669e9fce59905915c3ba1053f535add6a06
---

 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;
 }



More information about the ffmpeg-cvslog mailing list