Restore GLX context only if there is one.

This commit is contained in:
gb 2010-03-26 10:09:23 +00:00
parent c9f62b7405
commit 72fb4f6def

View file

@ -276,7 +276,8 @@ gst_vaapi_window_glx_resize(GstVaapiWindow *window, guint width, guint height)
GST_VAAPI_OBJECT_LOCK_DISPLAY(window);
if (gl_make_current(dpy, GST_VAAPI_OBJECT_ID(window), priv->context, &cs)) {
gl_resize(width, height);
gl_make_current(dpy, cs.window, cs.context, NULL);
if (cs.context)
gl_make_current(dpy, cs.window, cs.context, NULL);
}
GST_VAAPI_OBJECT_UNLOCK_DISPLAY(window);
return TRUE;