diff --git a/ext/eglgles/gstegladaptation.c b/ext/eglgles/gstegladaptation.c index 601170799e..7b0c7e37a3 100644 --- a/ext/eglgles/gstegladaptation.c +++ b/ext/eglgles/gstegladaptation.c @@ -471,13 +471,16 @@ gst_egl_adaptation_init_egl_surface (GstEglAdaptationContext * ctx, goto HANDLE_ERROR_LOCKED; } - gst_egl_adaptation_query_buffer_preserved (ctx); - if (!gst_egl_adaptation_context_make_current (ctx, TRUE)) goto HANDLE_ERROR_LOCKED; + gst_egl_adaptation_query_buffer_preserved (ctx); + gst_egl_adaptation_init_egl_exts (ctx); + /* Save surface dims */ + gst_egl_adaptation_update_surface_dimensions (ctx); + /* Save display's pixel aspect ratio * * DAR is reported as w/h * EGL_DISPLAY_SCALING wich is @@ -489,9 +492,6 @@ gst_egl_adaptation_init_egl_surface (GstEglAdaptationContext * ctx, */ gst_egl_adaptation_query_par (ctx); - /* Save surface dims */ - gst_egl_adaptation_update_surface_dimensions (ctx); - /* We have a surface! */ ctx->have_surface = TRUE;