Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Xext/xvmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ SOFTWARE.

#include <dix-config.h>

#include <stdbool.h>
#include <string.h>
#include <X11/X.h>
#include <X11/Xproto.h>
Expand Down Expand Up @@ -120,7 +121,6 @@ Bool noXvExtension = FALSE;

static x_server_generation_t XvExtensionGeneration = 0;
static x_server_generation_t XvScreenGeneration = 0;
static x_server_generation_t XvResourceGeneration = 0;

int XvReqCode;
static int XvEventBase;
Expand Down Expand Up @@ -203,15 +203,15 @@ XvExtensionInit(void)
}
}

static bool resources_initialized = false;

/* can be called from different angles */
static Bool
CreateResourceTypes(void)
{

if (XvResourceGeneration == serverGeneration)
if (resources_initialized)
return TRUE;

XvResourceGeneration = serverGeneration;

if (!(XvRTPort = CreateNewResourceType(XvdiDestroyPort, "XvRTPort"))) {
ErrorF("CreateResourceTypes: failed to allocate port resource.\n");
return FALSE;
Expand Down Expand Up @@ -252,7 +252,6 @@ CreateResourceTypes(void)
}

return TRUE;

}

static void XvWindowDestroy(CallbackListPtr *pcbl, ScreenPtr pScreen, WindowPtr pWin)
Expand Down