lavd/xv: free graphics context
authorLukasz Marek <lukasz.m.luki@gmail.com>
Fri, 1 Nov 2013 12:20:15 +0000 (13:20 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Fri, 1 Nov 2013 15:20:50 +0000 (16:20 +0100)
Valgrind detects mem leak from XCreateGC.
Free it with XFreeGC.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
libavdevice/xv.c

index 65f2f72..3b377f8 100644 (file)
@@ -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;
 }