eglglessink: Do not update_surface_dims() once per frame

And.. Upgrade debug message to warging on weird DAR.
Correct fix to avoid spaming with this message
once per each frame is avoid calling update_surface_dims()
at render_and_display(). This is handled at egl surface
init.
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2012-10-02 01:43:35 -03:00 committed by Sebastian Dröge
parent 162f63e064
commit a818d5c771

View file

@ -1404,7 +1404,7 @@ gst_eglglessink_update_surface_dimensions (GstEglGlesSink * eglglessink)
}
if (eglglessink->eglglesctx->pixel_aspect_ratio == EGL_UNKNOWN) {
GST_DEBUG_OBJECT (eglglessink, "PAR value returned doesn't make sense. "
GST_WARNING_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,8 +2039,7 @@ 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 (gst_eglglessink_update_surface_dimensions (eglglessink) ||
!eglglessink->display_region.w || !eglglessink->display_region.h) {
if (!eglglessink->display_region.w || !eglglessink->display_region.h) {
g_mutex_lock (eglglessink->flow_lock);
if (!eglglessink->force_aspect_ratio) {
eglglessink->display_region.x = 0;