Commit 6c51803d authored by Stefan Kost's avatar Stefan Kost
Browse files

x(v)imagesink: gracefully handle ximagesink>xwindow == NULL

Expose could be called before we have set the xwindow. Handle this gracefully
like we do in image_put.
Fixes #615789
parent 65657375
......@@ -922,10 +922,13 @@ gst_ximagesink_xwindow_update_geometry (GstXImageSink * ximagesink)
XWindowAttributes attr;
g_return_if_fail (GST_IS_XIMAGESINK (ximagesink));
g_return_if_fail (ximagesink->xwindow != NULL);
/* Update the window geometry */
g_mutex_lock (ximagesink->x_lock);
if (G_UNLIKELY (ximagesink->xwindow == NULL)) {
g_mutex_unlock (ximagesink->x_lock);
return;
}
XGetWindowAttributes (ximagesink->xcontext->disp,
ximagesink->xwindow->win, &attr);
......
......@@ -1048,10 +1048,13 @@ gst_xvimagesink_xwindow_update_geometry (GstXvImageSink * xvimagesink)
XWindowAttributes attr;
g_return_if_fail (GST_IS_XVIMAGESINK (xvimagesink));
g_return_if_fail (xvimagesink->xwindow != NULL);
/* Update the window geometry */
g_mutex_lock (xvimagesink->x_lock);
if (G_UNLIKELY (xvimagesink->xwindow == NULL)) {
g_mutex_unlock (xvimagesink->x_lock);
return;
}
XGetWindowAttributes (xvimagesink->xcontext->disp,
xvimagesink->xwindow->win, &attr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment