From 05d13e84ea723c1a48172bf6ea19a6a26ee397b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 30 Jun 2008 09:38:45 +0000 Subject: [PATCH] libs/gst/dataprotocol/dataprotocol.c: 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. --- ChangeLog | 7 +++++++ libs/gst/dataprotocol/dataprotocol.c | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0b2930..19a5682 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-06-30 Sebastian Dröge + + * 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. + 2008-06-29 Stefan Kost * libs/gst/controller/gstinterpolationcontrolsource.c: diff --git a/libs/gst/dataprotocol/dataprotocol.c b/libs/gst/dataprotocol/dataprotocol.c index 80c02c4..f253b41 100644 --- a/libs/gst/dataprotocol/dataprotocol.c +++ b/libs/gst/dataprotocol/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); \ -- 2.7.4