diff --git a/src/eglvivsink/egl_platform_fb.c b/src/eglvivsink/egl_platform_fb.c index eda6040..ad11a25 100644 --- a/src/eglvivsink/egl_platform_fb.c +++ b/src/eglvivsink/egl_platform_fb.c @@ -71,20 +71,25 @@ GstImxEglVivSinkEGLPlatform* gst_imx_egl_viv_sink_egl_platform_create(gchar cons return NULL; } if (!eglInitialize(platform->egl_display, &ver_major, &ver_minor)) { GST_ERROR("eglInitialize failed: %s", gst_imx_egl_viv_sink_egl_platform_get_last_error_string()); g_free(platform); return NULL; } + if (eglSwapInterval(platform->egl_display, 1) != EGL_TRUE) + { + GST_WARNING("eglSwapInterval failed, flicker possible!"); + } + GST_INFO("FB EGL platform initialized, using EGL %d.%d", ver_major, ver_minor); return platform; } void gst_imx_egl_viv_sink_egl_platform_destroy(GstImxEglVivSinkEGLPlatform *platform) { if (platform != NULL) { diff --git a/src/eglvivsink/egl_platform_x11.c b/src/eglvivsink/egl_platform_x11.c index 99ae600..ca7b33e 100644 --- a/src/eglvivsink/egl_platform_x11.c +++ b/src/eglvivsink/egl_platform_x11.c @@ -84,20 +84,25 @@ GstImxEglVivSinkEGLPlatform* gst_imx_egl_viv_sink_egl_platform_create(gchar cons } if (!eglInitialize(platform->egl_display, &ver_major, &ver_minor)) { GST_ERROR("eglInitialize failed: %s", gst_imx_egl_viv_sink_egl_platform_get_last_error_string()); XCloseDisplay(x11_display); g_free(platform); return NULL; } + if (eglSwapInterval(platform->egl_display, 1) != EGL_TRUE) + { + GST_WARNING("eglSwapInterval failed, flicker possible!"); + } + GST_INFO("X11 EGL platform initialized, using EGL %d.%d", ver_major, ver_minor); return platform; } void gst_imx_egl_viv_sink_egl_platform_destroy(GstImxEglVivSinkEGLPlatform *platform) { if (platform != NULL) {