aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xvmc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-20 15:26:41 +0000
committermarha <marha@users.sourceforge.net>2010-05-20 15:26:41 +0000
commitf5fb2d27f1fd4976f0e77d97461a5e57ba6c9a23 (patch)
treec76e9cb708483e65b114c08ed008880f478cae15 /xorg-server/Xext/xvmc.c
parentb16c0295c9f95426980d567e93ae00c52545b3fa (diff)
parent3319741e6f9fc3232eb40462a261271b9af2dcb2 (diff)
downloadvcxsrv-f5fb2d27f1fd4976f0e77d97461a5e57ba6c9a23.tar.gz
vcxsrv-f5fb2d27f1fd4976f0e77d97461a5e57ba6c9a23.tar.bz2
vcxsrv-f5fb2d27f1fd4976f0e77d97461a5e57ba6c9a23.zip
svn merge "^/branches/released" .
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