aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xvmc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-20 07:07:37 +0000
committermarha <marha@users.sourceforge.net>2010-05-20 07:07:37 +0000
commit3319741e6f9fc3232eb40462a261271b9af2dcb2 (patch)
treeffe7fbae59390aafa850dcdbd3ea48d2cb59bda0 /xorg-server/Xext/xvmc.c
parent153f5cafa19da4e4c0cf21e9c909958359ed8ebd (diff)
downloadvcxsrv-3319741e6f9fc3232eb40462a261271b9af2dcb2.tar.gz
vcxsrv-3319741e6f9fc3232eb40462a261271b9af2dcb2.tar.bz2
vcxsrv-3319741e6f9fc3232eb40462a261271b9af2dcb2.zip
xserver git update 20/5/2010
Diffstat (limited to 'xorg-server/Xext/xvmc.c')
-rw-r--r--xorg-server/Xext/xvmc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/xorg-server/Xext/xvmc.c b/xorg-server/Xext/xvmc.c
index 18a81c76b..4866d1d45 100644
--- a/xorg-server/Xext/xvmc.c
+++ b/xorg-server/Xext/xvmc.c
@@ -40,7 +40,6 @@ unsigned long XvMCGeneration = 0;
int XvMCReqCode;
int XvMCEventBase;
-int XvMCErrorBase;
unsigned long XvMCRTContext;
unsigned long XvMCRTSurface;
@@ -276,7 +275,7 @@ ProcXvMCDestroyContext(ClientPtr client)
rc = dixLookupResourceByType(&val, stuff->context_id, XvMCRTContext,
client, DixDestroyAccess);
if (rc != Success)
- return (rc == BadValue) ? XvMCBadContext + XvMCErrorBase : rc;
+ return rc;
FreeResource(stuff->context_id, RT_NONE);
@@ -299,7 +298,7 @@ ProcXvMCCreateSurface(ClientPtr client)
result = dixLookupResourceByType((pointer *)&pContext, stuff->context_id,
XvMCRTContext, client, DixUseAccess);
if (result != Success)
- return (result == BadValue) ? XvMCBadContext + XvMCErrorBase : result;
+ return result;
pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen);
@@ -346,7 +345,7 @@ ProcXvMCDestroySurface(ClientPtr client)
rc = dixLookupResourceByType(&val, stuff->surface_id, XvMCRTSurface,
client, DixDestroyAccess);
if (rc != Success)
- return (rc == BadValue) ? XvMCBadSurface + XvMCErrorBase : rc;
+ return rc;
FreeResource(stuff->surface_id, RT_NONE);
@@ -371,7 +370,7 @@ ProcXvMCCreateSubpicture(ClientPtr client)
result = dixLookupResourceByType((pointer *)&pContext, stuff->context_id,
XvMCRTContext, client, DixUseAccess);
if (result != Success)
- return (result == BadValue) ? XvMCBadContext + XvMCErrorBase : result;
+ return result;
pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen);
@@ -463,7 +462,7 @@ ProcXvMCDestroySubpicture(ClientPtr client)
rc = dixLookupResourceByType(&val, stuff->subpicture_id, XvMCRTSubpicture,
client, DixDestroyAccess);
if (rc != Success)
- return (rc == BadValue) ? XvMCBadSubpicture + XvMCErrorBase : rc;
+ return rc;
FreeResource(stuff->subpicture_id, RT_NONE);
@@ -694,7 +693,9 @@ XvMCExtensionInit(void)
XvMCReqCode = extEntry->base;
XvMCEventBase = extEntry->eventBase;
- XvMCErrorBase = extEntry->errorBase;
+ SetResourceTypeErrorValue(XvMCRTContext, extEntry->errorBase + XvMCBadContext);
+ SetResourceTypeErrorValue(XvMCRTSurface, extEntry->errorBase + XvMCBadSurface);
+ SetResourceTypeErrorValue(XvMCRTSubpicture, extEntry->errorBase + XvMCBadSubpicture);
}
static Bool