video_dec_cuda is Get defalut EGL display failed

file: tegra_multimedia_api/samples/02_video_dec_cuda

// Get defalut EGL display
ctx.egl_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
if (ctx.egl_display == EGL_NO_DISPLAY)
{
    fprintf(stderr, "Error while get EGL display connection\n");
    return -1;
}

ctx.egl_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);

the value of return ctx.egl_display is error。

Erro while initialize EGL display connection

duplicate of https://devtalk.nvidia.com/default/topic/1017548/jetson-tx1/use-tegra_multimedia_api-samples-02_video_dec_cuda-sampe-but-get-defalut-egl-display-fail-/post/5182481/#5182481