blob: 1a03eafa763e8a84baeb874c74ce426ae1466d0b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
From 57a1296d5913b222be87ccee1ae981b84931a7da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
Date: Tue, 13 Jun 2023 01:29:14 +0100
Subject: [PATCH 2/2] asfmux: fix potentially unaligned write on 32-bit ARM
Fixes #2665
---
.../gst-plugins-bad/gst/asfmux/gstasfobjects.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/subprojects/gst-plugins-bad/gst/asfmux/gstasfobjects.c b/subprojects/gst-plugins-bad/gst/asfmux/gstasfobjects.c
index d9739826384..fa0f2849d17 100644
--- a/gst/asfmux/gstasfobjects.c
+++ b/gst/asfmux/gstasfobjects.c
@@ -311,14 +311,10 @@ gst_asf_put_time (guint8 * buf, guint64 time)
void
gst_asf_put_guid (guint8 * buf, Guid guid)
{
- guint32 *aux32 = (guint32 *) buf;
- guint16 *aux16 = (guint16 *) & (buf[4]);
- guint64 *aux64 = (guint64 *) & (buf[8]);
- *aux32 = GUINT32_TO_LE (guid.v1);
- *aux16 = GUINT16_TO_LE (guid.v2);
- aux16 = (guint16 *) & (buf[6]);
- *aux16 = GUINT16_TO_LE (guid.v3);
- *aux64 = GUINT64_TO_BE (guid.v4);
+ GST_WRITE_UINT32_LE (buf + 0, guid.v1);
+ GST_WRITE_UINT16_LE (buf + 4, guid.v2);
+ GST_WRITE_UINT16_LE (buf + 6, guid.v3);
+ GST_WRITE_UINT64_BE (buf + 8, guid.v4);
}
/**
--
GitLab
|