From 87a028a0a4d32efa2b11133b52f65cdc0e87f93b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 16 Oct 2012 16:25:05 +0200 Subject: [PATCH] eglglessink: Make sure to always reset the display region in start() --- ext/eglgles/gsteglglessink.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ext/eglgles/gsteglglessink.c b/ext/eglgles/gsteglglessink.c index 2fbbf3bb85..ce2ee95c21 100644 --- a/ext/eglgles/gsteglglessink.c +++ b/ext/eglgles/gsteglglessink.c @@ -1140,8 +1140,7 @@ render_thread_func (GstEglGlesSink * eglglessink) } } - if (!gst_eglglessink_context_make_current (eglglessink, FALSE)) - return FALSE; + gst_eglglessink_context_make_current (eglglessink, FALSE); if (eglglessink->eglglesctx.surface) { eglDestroySurface (eglglessink->eglglesctx.display, @@ -1186,6 +1185,15 @@ gst_eglglessink_start (GstEglGlesSink * eglglessink) goto HANDLE_ERROR; } + GST_OBJECT_LOCK (eglglessink); + /* 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; + GST_OBJECT_UNLOCK (eglglessink); + eglglessink->last_flow = GST_FLOW_OK; gst_data_queue_set_flushing (eglglessink->queue, FALSE);