lavd/xv: free graphics context

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>
pull/45/head
Lukasz Marek 11 years ago committed by Stefano Sabatini
parent 8b2dd04afc
commit c617c669e9
  1. 1
      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;
}

Loading…
Cancel
Save