Skip to content

Commit

Permalink
Set DISPLAY if not already set.
Browse files Browse the repository at this point in the history
  • Loading branch information
jojo61 committed May 16, 2022
1 parent ff16beb commit 115f3b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion softhdcuvid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extern void ToggleLUT();
/// vdr-plugin version number.
/// Makefile extracts the version number for generating the file name
/// for the distribution archive.
static const char *const VERSION = "3.5.6"
static const char *const VERSION = "3.6"
#ifdef GIT_REV
"-GIT" GIT_REV
#endif
Expand Down
10 changes: 9 additions & 1 deletion video.c
Original file line number Diff line number Diff line change
Expand Up @@ -3124,7 +3124,7 @@ int get_RGB(CuvidDecoder *decoder) {
glActiveTexture(GL_TEXTURE0);
}
glFlush();
Debug(3, "Read pixels %d %d\n", width, height);
//Debug(3, "Read pixels %d %d\n", width, height);

glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glPixelStorei(GL_PACK_ALIGNMENT, 1);
Expand Down Expand Up @@ -7022,6 +7022,14 @@ void VideoInit(const char *display_name) {
if (!display_name && !(display_name = getenv("DISPLAY"))) {
// if no environment variable, use :0.0 as default display name
display_name = ":0.0";

}
if (!getenv("DISPLAY")) {
//force set DISPLAY environment variable, otherwise nvidia driver
//has problems at libplace-swapchain-init
Debug(3, "video: setting ENV DISPLAY=%s\n",display_name);
setenv("DISPLAY",display_name,0);
//Debug(3, "video: ENV:(%s)\n",getenv("DISPLAY"));
}

if (!(XlibDisplay = XOpenDisplay(display_name))) {
Expand Down

0 comments on commit 115f3b1

Please sign in to comment.