eglglessink: Reorder surface queries

Otherwise wrong values can be returned.
This commit is contained in:
Sebastian Dröge 2013-04-16 22:51:02 +02:00
parent 118f8f33ef
commit 92e9988a40

View file

@ -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;