From d26b52d5ce776c889881ea47419f29f35a063374 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 14 Dec 2006 12:05:49 +0000 Subject: [PATCH] gst/mpegstream/gstmpegparse.c: Use our alignment-safe macros here too, since we can't assume that Original commit message from CVS: * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_parse_packhead): Use our alignment-safe macros here too, since we can't assume that GST_BUFFER_DATA is aligned (these are subbuffers we're dealing with here). --- ChangeLog | 7 +++++++ gst/mpegstream/gstmpegparse.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7dd8fd0..e92b18b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2006-12-14 Tim-Philipp Müller + * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_parse_packhead): + Use our alignment-safe macros here too, since we can't assume that + GST_BUFFER_DATA is aligned (these are subbuffers we're dealing with + here). + +2006-12-14 Tim-Philipp Müller + * gst/realmedia/rmdemux.c: (gst_rmdemux_parse_indx_data): Also, don't read the index for a stream a second time when operating in pull-mode and reaching the end of the file. diff --git a/gst/mpegstream/gstmpegparse.c b/gst/mpegstream/gstmpegparse.c index f38999a..5ba8b68 100644 --- a/gst/mpegstream/gstmpegparse.c +++ b/gst/mpegstream/gstmpegparse.c @@ -492,8 +492,8 @@ gst_mpeg_parse_parse_packhead (GstMPEGParse * mpeg_parse, GstBuffer * buffer) buf = GST_BUFFER_DATA (buffer); buf += 4; - scr1 = GUINT32_FROM_BE (*(guint32 *) buf); - scr2 = GUINT32_FROM_BE (*(guint32 *) (buf + 4)); + scr1 = GST_READ_UINT32_BE (buf); + scr2 = GST_READ_UINT32_BE (buf + 4); /* Extract the SCR and rate values from the header. */ if (GST_MPEG_PACKETIZE_IS_MPEG2 (mpeg_parse->packetize)) { -- 2.7.4