mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
xvimagesink: Fallback to non-XShm mode if allocating the XShm image failed
Fixes bug #630456.
This commit is contained in:
parent
ff1c05d876
commit
1f707ac3e0
1 changed files with 8 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue