aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xvmc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-18 08:33:31 +0200
committermarha <marha@users.sourceforge.net>2012-07-18 08:33:31 +0200
commit2ff5448bcca8cba4b62026d5493cb08aaf2838d8 (patch)
tree355bad312548535d148aa058c089aefc81e10ab3 /xorg-server/Xext/xvmc.c
parentd09d7be8bbbb39926f44834023d7120535155829 (diff)
downloadvcxsrv-2ff5448bcca8cba4b62026d5493cb08aaf2838d8.tar.gz
vcxsrv-2ff5448bcca8cba4b62026d5493cb08aaf2838d8.tar.bz2
vcxsrv-2ff5448bcca8cba4b62026d5493cb08aaf2838d8.zip
fontconfig mesa xserver git update 18 Jul 2012
Diffstat (limited to 'xorg-server/Xext/xvmc.c')
-rw-r--r--xorg-server/Xext/xvmc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xorg-server/Xext/xvmc.c b/xorg-server/Xext/xvmc.c
index 8d93cc3b0..5f0123b32 100644
--- a/xorg-server/Xext/xvmc.c
+++ b/xorg-server/Xext/xvmc.c
@@ -135,6 +135,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client)
xvmcSurfaceInfo info;
XvMCAdaptorPtr adaptor = NULL;
XvMCSurfaceInfoPtr surface;
+ int num_surfaces;
REQUEST(xvmcListSurfaceTypesReq);
REQUEST_SIZE_MATCH(xvmcListSurfaceTypesReq);
@@ -154,16 +155,17 @@ ProcXvMCListSurfaceTypes(ClientPtr client)
}
}
+ num_surfaces = (adaptor) ? adaptor->num_surfaces : 0;
rep = (xvmcListSurfaceTypesReply) {
.type = X_Reply,
.sequenceNumber = client->sequence,
- .num = (adaptor) ? adaptor->num_surfaces : 0,
- .length = bytes_to_int32(rep.num * sizeof(xvmcSurfaceInfo)),
+ .num = num_surfaces,
+ .length = bytes_to_int32(num_surfaces * sizeof(xvmcSurfaceInfo)),
};
WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), &rep);
- for (i = 0; i < rep.num; i++) {
+ for (i = 0; i < num_surfaces; i++) {
surface = adaptor->surfaces[i];
info.surface_type_id = surface->surface_type_id;
info.chroma_format = surface->chroma_format;