eglglessink: Revert "Do not update_surface_dims() once per frame"
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 2 Oct 2012 07:48:15 +0000 (09:48 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 18 Oct 2012 12:35:16 +0000 (14:35 +0200)
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.

ext/eglgles/gsteglglessink.c

index efffc25..061c99e 100644 (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;