mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
mpegdemux: fix allignment issue
Use GST_READ_UINT32_BE instead of GUINT32_FROM_BE to fix int allignment issues on ARM Fixes #606371
This commit is contained in:
parent
67e5d76d08
commit
d68c2d4ab9
1 changed files with 6 additions and 6 deletions
|
@ -1497,8 +1497,8 @@ gst_flups_demux_parse_pack_start (GstFluPSDemux * demux)
|
||||||
/* skip start code */
|
/* skip start code */
|
||||||
data += 4;
|
data += 4;
|
||||||
|
|
||||||
scr1 = GUINT32_FROM_BE (*(guint32 *) data);
|
scr1 = GST_READ_UINT32_BE (data);
|
||||||
scr2 = GUINT32_FROM_BE (*(guint32 *) (data + 4));
|
scr2 = GST_READ_UINT32_BE (data + 4);
|
||||||
|
|
||||||
/* fixed length to begin with, start code and two scr values */
|
/* fixed length to begin with, start code and two scr values */
|
||||||
length = 8 + 4;
|
length = 8 + 4;
|
||||||
|
@ -1544,7 +1544,7 @@ gst_flups_demux_parse_pack_start (GstFluPSDemux * demux)
|
||||||
to DTS/PTS, that also implies 1 tick rounding error */
|
to DTS/PTS, that also implies 1 tick rounding error */
|
||||||
data += 6;
|
data += 6;
|
||||||
/* PMR:22 ! :2==11 ! reserved:5 ! stuffing_len:3 */
|
/* PMR:22 ! :2==11 ! reserved:5 ! stuffing_len:3 */
|
||||||
next32 = (GUINT32_FROM_BE ((*(guint32 *) data)));
|
next32 = GST_READ_UINT32_BE (data);
|
||||||
if (G_UNLIKELY ((next32 & 0x00000300) != 0x00000300))
|
if (G_UNLIKELY ((next32 & 0x00000300) != 0x00000300))
|
||||||
goto lost_sync;
|
goto lost_sync;
|
||||||
|
|
||||||
|
@ -2227,8 +2227,8 @@ gst_flups_demux_scan_ts (GstFluPSDemux * demux, const guint8 * data,
|
||||||
/* skip start code */
|
/* skip start code */
|
||||||
data += 4;
|
data += 4;
|
||||||
|
|
||||||
scr1 = GUINT32_FROM_BE (*(guint32 *) data);
|
scr1 = GST_READ_UINT32_BE (data);
|
||||||
scr2 = GUINT32_FROM_BE (*(guint32 *) (data + 4));
|
scr2 = GST_READ_UINT32_BE (data + 4);
|
||||||
|
|
||||||
/* start parsing the stream */
|
/* start parsing the stream */
|
||||||
if ((*data & 0xc0) == 0x40) {
|
if ((*data & 0xc0) == 0x40) {
|
||||||
|
@ -2260,7 +2260,7 @@ gst_flups_demux_scan_ts (GstFluPSDemux * demux, const guint8 * data,
|
||||||
to DTS/PTS, that also implies 1 tick rounding error */
|
to DTS/PTS, that also implies 1 tick rounding error */
|
||||||
data += 6;
|
data += 6;
|
||||||
/* PMR:22 ! :2==11 ! reserved:5 ! stuffing_len:3 */
|
/* 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)
|
if ((next32 & 0x00000300) != 0x00000300)
|
||||||
goto beach;
|
goto beach;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue