diff options
Diffstat (limited to 'src/Xv.c')
-rw-r--r-- | src/Xv.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 */ |