eglglessink: Reset display_region dims at caps renego

This commit is contained in:
Reynaldo H. Verdejo Pinochet 2012-10-04 01:56:10 -03:00 committed by Sebastian Dröge
parent f28f5df29e
commit 884e5fa173

View file

@ -2229,6 +2229,7 @@ gst_eglglessink_getcaps (GstBaseSink * bsink)
return ret;
}
/* XXX: WIP renego logic */
static gboolean
gst_eglglessink_setcaps (GstBaseSink * bsink, GstCaps * caps)
{
@ -2341,6 +2342,13 @@ gst_eglglessink_setcaps (GstBaseSink * bsink, GstCaps * caps)
eglglessink->eglglesctx->display = NULL;
/* Reset display region
* XXX: Should probably keep old ones if set_render_rect()
* has been called.
*/
eglglessink->display_region.w = 0;
eglglessink->display_region.h = 0;
if (!gst_eglglessink_init_egl_display (eglglessink)) {
GST_ERROR_OBJECT (eglglessink, "Could not reinit display connection");
goto HANDLE_ERROR;