eglglessink: Revert "Do not update_surface_dims() once per frame"

This reverts commit 82103376ede2bc7c63dd699f5982168660f67852.

We have to update the surface dimensions on every frame to
make sure that we get notified about updates. This happens
for example if the Android window gets re-layouted because
a widget takes more space than before.
This commit is contained in:
Sebastian Dröge 2012-10-02 09:48:15 +02:00
parent a818d5c771
commit fc0dc0055a

View file

@ -1404,7 +1404,7 @@ gst_eglglessink_update_surface_dimensions (GstEglGlesSink * eglglessink)
}
if (eglglessink->eglglesctx->pixel_aspect_ratio == EGL_UNKNOWN) {
GST_WARNING_OBJECT (eglglessink, "PAR value returned doesn't make sense. "
GST_DEBUG_OBJECT (eglglessink, "PAR value returned doesn't make sense. "
"Will use default: %d/%d", EGL_DISPLAY_SCALING, EGL_DISPLAY_SCALING);
eglglessink->eglglesctx->pixel_aspect_ratio = EGL_DISPLAY_SCALING;
}
@ -2039,7 +2039,8 @@ gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink,
* do this trying to take PAR/DAR into account unless the
* calling party explicitly ask us not to.
*/
if (!eglglessink->display_region.w || !eglglessink->display_region.h) {
if (gst_eglglessink_update_surface_dimensions (eglglessink) ||
!eglglessink->display_region.w || !eglglessink->display_region.h) {
g_mutex_lock (eglglessink->flow_lock);
if (!eglglessink->force_aspect_ratio) {
eglglessink->display_region.x = 0;