summaryrefslogtreecommitdiff
path: root/src/Xv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xv.c')
-rw-r--r--src/Xv.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Xv.c b/src/Xv.c
index f268f8e..15c0bfd 100644
--- a/src/Xv.c
+++ b/src/Xv.c
@@ -850,6 +850,17 @@ XvQueryPortAttributes(Display *dpy, XvPortID port, int *num)
return ret;
}
+ /*
+ * X server sends data packed as:
+ * attribute1, name1, attribute2, name2, ...
+ * We allocate a single buffer large enough to hold them all and
+ * then de-interleave the data so we return it to clients as:
+ * attribute1, attribute2, ..., name1, name2, ...
+ * so that clients may refer to attributes as a simple array of
+ * structs: attributes[0], attributes[1], ...
+ * and free it as a single/simple buffer.
+ */
+
if(rep.num_attributes) {
unsigned long size;
/* limit each part to no more than one half the max size */