From: Sebastian Dröge Date: Thu, 26 May 2011 10:48:36 +0000 (+0200) Subject: xvimagesink: Fallback to non-XShm mode if allocating the XShm image failed X-Git-Tag: 1.19.3~509^2~7136^2~518 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f707ac3e01ecd7f984e567ca3cb3258cd973743;p=platform%2Fupstream%2Fgstreamer.git xvimagesink: Fallback to non-XShm mode if allocating the XShm image failed Fixes bug #630456. --- diff --git a/sys/ximage/ximageutil.c b/sys/ximage/ximageutil.c index 0ef4b06..2fac09a 100644 --- a/sys/ximage/ximageutil.c +++ b/sys/ximage/ximageutil.c @@ -395,7 +395,13 @@ gst_ximageutil_ximage_new (GstXContext * xcontext, xcontext->visual, xcontext->depth, ZPixmap, NULL, &ximage->SHMInfo, ximage->width, ximage->height); if (!ximage->ximage) { - goto beach; + GST_WARNING_OBJECT (parent, + "could not XShmCreateImage a %dx%d image", + ximage->width, ximage->height); + + /* Retry without XShm */ + xcontext->use_xshm = FALSE; + goto no_xshm; } /* we have to use the returned bytes_per_line for our shm size */ @@ -421,6 +427,7 @@ gst_ximageutil_ximage_new (GstXContext * xcontext, XSync (xcontext->disp, FALSE); } else + no_xshm: #endif /* HAVE_XSHM */ { ximage->ximage = XCreateImage (xcontext->disp,