resindvd: fix unaligned access in this copy of mpegdemux as well
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 11 Jan 2010 01:02:59 +0000 (01:02 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 11 Jan 2010 01:03:38 +0000 (01:03 +0000)
See #606371.

ext/resindvd/gstmpegdemux.c

index 0cda059..405a0c1 100644 (file)
@@ -1196,8 +1196,8 @@ gst_flups_demux_parse_pack_start (GstFluPSDemux * demux)
   /* skip start code */
   data += 4;
 
-  scr1 = GUINT32_FROM_BE (*(guint32 *) data);
-  scr2 = GUINT32_FROM_BE (*(guint32 *) (data + 4));
+  scr1 = GST_READ_UINT32_BE (data);
+  scr2 = GST_READ_UINT32_BE (data + 4);
 
   /* start parsing the stream */
   if ((*data & 0xc0) == 0x40) {
@@ -1241,7 +1241,7 @@ gst_flups_demux_parse_pack_start (GstFluPSDemux * demux)
        to DTS/PTS, that also implies 1 tick rounding error */
     data += 6;
     /* PMR:22 ! :2==11 ! reserved:5 ! stuffing_len:3 */
-    next32 = (GUINT32_FROM_BE ((*(guint32 *) data)));
+    next32 = GST_READ_UINT32_BE (data);
     if ((next32 & 0x00000300) != 0x00000300)
       goto lost_sync;