[farsight2/master] rtp: Make cache work on memaligned platforms
Olivier Crête
olivier.crete at collabora.co.uk
Mon Jun 15 14:53:32 PDT 2009
---
gst/fsrtpconference/fs-rtp-codec-cache.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-codec-cache.c b/gst/fsrtpconference/fs-rtp-codec-cache.c
index d4774d8..558974a 100644
--- a/gst/fsrtpconference/fs-rtp-codec-cache.c
+++ b/gst/fsrtpconference/fs-rtp-codec-cache.c
@@ -122,7 +122,7 @@ read_codec_blueprint_uint (gchar **in, gsize *size, guint *val) {
if (*size < sizeof (guint))
return FALSE;
- *val = *((guint *) *in);
+ memcpy (val, *in, sizeof(guint));
*in += sizeof (guint);
*size -= sizeof (guint);
return TRUE;
@@ -133,7 +133,7 @@ read_codec_blueprint_int (gchar **in, gsize *size, gint *val) {
if (*size < sizeof (gint))
return FALSE;
- *val = *((gint *) *in);
+ memcpy (val, *in, sizeof(gint));
*in += sizeof (gint);
*size -= sizeof (gint);
return TRUE;
@@ -340,7 +340,7 @@ load_codecs_cache (FsMediaType media_type)
goto error;
}
- num_blueprints = *((gint *) in);
+ memcpy (&num_blueprints, in, sizeof(gint));
in += sizeof (gint);
size -= sizeof (gint);
--
1.5.6.5
More information about the farsight-commits
mailing list