summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-06-30 09:38:45 +0000
committerTim-Philipp Müller <tim@centricular.net>2012-09-11 01:54:39 +0100
commit1774354a3a791ea2d383fad5d4b474103efbab7c (patch)
tree8f324cac4b6d5df8540b391788d1ab234ccd8277
parent458f65fbba31b680e9adbfa7e2ef85215513c547 (diff)
gdp: Don't write to the same region of memory as a uint64 and uint16 as this breaks ...
Original commit message from CVS: * libs/gst/dataprotocol/dataprotocol.c: Don't write to the same region of memory as a uint64 and uint16 as this breaks strict aliasing rules and apparantly breaks on PPC and s390. Thanks to Sjoerd Simons for analysing. Fixes bug #348114.
-rw-r--r--gst/gdp/dataprotocol.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gst/gdp/dataprotocol.c b/gst/gdp/dataprotocol.c
index 80c02c474..f253b415e 100644
--- a/gst/gdp/dataprotocol.c
+++ b/gst/gdp/dataprotocol.c
@@ -82,7 +82,7 @@ GST_DEBUG_CATEGORY_STATIC (data_protocol_debug);
/* helper macros */
-/* write first 6 bytes of header, as well as ABI padding */
+/* write first 6 bytes of header */
#define GST_DP_INIT_HEADER(h, version, flags, type) \
G_STMT_START { \
gint maj = 0, min = 0; \
@@ -95,9 +95,6 @@ G_STMT_START { \
h[2] = (guint8) flags; \
h[3] = 0; /* padding byte */ \
GST_WRITE_UINT16_BE (h + 4, type); \
- \
- GST_WRITE_UINT64_BE (h + 42, (guint64) 0); /* ABI padding */ \
- GST_WRITE_UINT64_BE (h + 50, (guint64) 0); /* ABI padding */ \
} G_STMT_END
#define GST_DP_SET_CRC(h, flags, payload, length); \