This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/xawtv3.git tree:
Subject: Check the return value for XF86DGAGetVideoLL() Author: Dmitry Butskoy <[email protected]> Date: Fri Feb 4 14:26:10 2011 -0200 The return code of the function XF86DGAGetVideoLL() was never checked, but must be, otherwise xawtv does not know that dga mode is broken or incomplete, and the "returned" values for bpl and base are wrong. Signed-off-by: Mauro Carvalho Chehab <[email protected]> console/v4l-conf.c | 3 ++- x11/xt.c | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) --- http://git.linuxtv.org/xawtv3.git?a=commitdiff;h=b948ae716f372b1654669b646ecaa04308b85014 diff --git a/console/v4l-conf.c b/console/v4l-conf.c index 2544182..99f2b90 100644 --- a/console/v4l-conf.c +++ b/console/v4l-conf.c @@ -255,7 +255,8 @@ displayinfo_dga(Display *dpy, struct DISPLAYINFO *d) return; } orig_xfree_error_handler = XSetErrorHandler(dga_error_handler); - XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(void*)&base,&width,&foo,&bar); + if (!XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(void*)&base,&width,&foo,&bar)) + dga_error = 1; XSync(dpy, 0); XSetErrorHandler(orig_xfree_error_handler); if (dga_error) { diff --git a/x11/xt.c b/x11/xt.c index 87cd42d..4b82ffe 100644 --- a/x11/xt.c +++ b/x11/xt.c @@ -1382,8 +1382,12 @@ grabber_init() if (have_dga) { int bar,fred; orig_xfree_error_handler = XSetErrorHandler(xfree_dga_error_handler); - XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(void*)&base, - &screen.bytesperline,&bar,&fred); + if (!XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(void*)&base, + &screen.bytesperline,&bar,&fred)) { + have_dga = 0; + memset(&screen,0,sizeof(screen)); /* paranoia */ + base = NULL; /* paranoia */ + } XSync(dpy, 0); XSetErrorHandler(orig_xfree_error_handler); } _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
