diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-29 22:24:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-29 22:24:10 +0100 |
commit | 11d695d120d0249954b06646561cb43be04d8240 (patch) | |
tree | 2926b422d5f5a2471f2fedc887c28645ae13e819 | |
parent | 977cb54f941c423eddbdc95c76fb41fde31f8afc (diff) | |
download | ffmpeg-11d695d120d0249954b06646561cb43be04d8240.tar.gz |
x11grab: fix mixed declaration and code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavdevice/x11grab.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c index 4dddceb5aa..612400654b 100644 --- a/libavdevice/x11grab.c +++ b/libavdevice/x11grab.c @@ -353,14 +353,16 @@ paint_mouse_pointer(XImage *image, struct x11grab *s) * Anyone who performs further investigation of the xlib API likely risks * permanent brain damage. */ uint8_t *pix = image->data; + Cursor c; + Window w; + XSetWindowAttributes attr; /* Code doesn't currently support 16-bit or PAL8 */ if (image->bits_per_pixel != 24 && image->bits_per_pixel != 32) return; - Cursor c = XCreateFontCursor(dpy, XC_left_ptr); - Window w = DefaultRootWindow(dpy); - XSetWindowAttributes attr; + c = XCreateFontCursor(dpy, XC_left_ptr); + w = DefaultRootWindow(dpy); attr.cursor = c; XChangeWindowAttributes(dpy, w, CWCursor, &attr); |