diff options
author | Christian Linhart <chris@demorecorder.com> | 2015-09-13 15:45:17 +0200 |
---|---|---|
committer | Christian Linhart <chris@demorecorder.com> | 2015-10-26 17:35:46 +0100 |
commit | 259a6f122f905e1d702af9d355356df8c3f462f5 (patch) | |
tree | 684e22cb0b5cd0316df0e78fb4ce5c2a0d75f0c4 /src | |
parent | 306c0a2d9636b6687fb679196b08e53231f11e4e (diff) |
xv: struct "AttributeInfo": add explicit align pad
The align pad is needed so that a in list of struct "AttributeInfo",
the 32-bit fields in subsequent "AttributeInfo" are aligned.
(all fields except "name" are 32-bit values)
The xv-protocol-spec does not contain the protocol encoding.
(it specifies the protocol on a higher level)
The X-Server uses function "WriteToClient" to write the list "name"
to the connection:
http://cgit.freedesktop.org/xorg/xserver/tree/Xext/xvdisp.c?id=xorg-server-1.17.99.901#n809
Function "WriteToClient" does 4-byte alignment padding:
http://cgit.freedesktop.org/xorg/xserver/tree/os/io.c?id=xorg-server-1.17.99.901#n804
BTW, With the current server impl, the alignpad is not strictly needed
because the field "size", which describes the length of list "name"
is set to a multiple of 4:
http://cgit.freedesktop.org/xorg/xserver/tree/Xext/xvdisp.c?id=xorg-server-1.17.99.901#n805
Signed-off-by: Christian Linhart <chris@demorecorder.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/xv.xml | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -147,6 +147,7 @@ authorization from the authors. <list type="char" name="name"> <fieldref>size</fieldref> </list> + <pad align="4" /> </struct> <struct name="ImageFormatInfo"> |