summaryrefslogtreecommitdiff
path: root/gst/vmnc
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2010-01-11 00:59:38 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-01-11 01:01:46 +0000
commitee65cabbb3a6926bf33cbb6f29d4591b10403147 (patch)
tree58636736dc2d53cb903212e15615b317690b6060 /gst/vmnc
parent904a4e0f48c8adc36d59aa565202ace9d4d92cd2 (diff)
vmnc: use existing macros to avoid alignment issues
Diffstat (limited to 'gst/vmnc')
-rw-r--r--gst/vmnc/vmncdec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/vmnc/vmncdec.c b/gst/vmnc/vmncdec.c
index 6b29c5923..dc290ddd1 100644
--- a/gst/vmnc/vmncdec.c
+++ b/gst/vmnc/vmncdec.c
@@ -43,9 +43,9 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
#define GST_VMNC_DEC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VMNC_DEC,GstVMncDec))
-#define RFB_GET_UINT32(ptr) GUINT32_FROM_BE (*(guint32 *)(ptr))
-#define RFB_GET_UINT16(ptr) GUINT16_FROM_BE (*(guint16 *)(ptr))
-#define RFB_GET_UINT8(ptr) (*(guint8 *)(ptr))
+#define RFB_GET_UINT32(ptr) GST_READ_UINT32_BE(ptr)
+#define RFB_GET_UINT16(ptr) GST_READ_UINT16_BE(ptr)
+#define RFB_GET_UINT8(ptr) GST_READ_UINT8(ptr)
enum
{
@@ -729,6 +729,7 @@ vmnc_handle_copy_rectangle (GstVMncDec * dec, struct RfbRectangle *rect,
return 4;
}
+/* FIXME: data+off might not be properly aligned */
#define READ_PIXEL(pixel, data, off, len) \
if (dec->format.bytes_per_pixel == 1) { \
if (off >= len) \