From 92e9988a4093b576eb63ddf69b28c4f15483d326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 16 Apr 2013 22:51:02 +0200 Subject: [PATCH] eglglessink: Reorder surface queries Otherwise wrong values can be returned. --- ext/eglgles/gstegladaptation.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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;