GNOME Bugzilla – Bug 606371
mpegdemux2 plugin doesn't work on some ARM CPU due to the guint32*'s alignment
Last modified: 2010-02-09 09:55:55 UTC
guint32* address is required to align to int boundary, which will be 4x. Can't get a correct int value with address offset 1,2,3. I modified the original gstmpegdemux.c ( http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst/mpegdemux/gstmpegdemux.c) by replacing: "GUINT32_FROM_BE (*(guint32 *) data)" --> "GST_READ_UINT32_BE(data)" "GUINT32_FROM_BE (*(guint32 *) (data + 4))" ---> GST_READ_UINT32_BE((data + 4)) And it works well.
Created attachment 151017 [details] [review] bug fix for #606371
Could you provide your real name for adding to the commit logs?
(In reply to comment #2) > Could you provide your real name for adding to the commit logs? Hi Thiago, my real name is Linqiang Pu. Thanks!
Fixed, thanks. Module: gst-plugins-bad Branch: master Commit: d68c2d4ab93fca79d0d1a1ebadde91176359c7ed URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=d68c2d4ab93fca79d0d1a1ebadde91176359c7ed Author: Linqiang Pu <pulq.ustc@gmail.com> Date: Sun Jan 10 10:06:55 2010 -0300 mpegdemux: fix allignment issue Use GST_READ_UINT32_BE instead of GUINT32_FROM_BE to fix int allignment issues on ARM Fixes #606371