mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 16:35:40 +00:00
tests: rtpbin_buffer_list: fix possible unaligned read on 32-bit ARM
Fixes #2666 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4842>
This commit is contained in:
parent
c70365ee79
commit
2abdfb9657
1 changed files with 8 additions and 2 deletions
|
@ -25,6 +25,12 @@
|
||||||
#include <gst/rtp/gstrtpbuffer.h>
|
#include <gst/rtp/gstrtpbuffer.h>
|
||||||
#include <gst/rtp/gstrtcpbuffer.h>
|
#include <gst/rtp/gstrtcpbuffer.h>
|
||||||
|
|
||||||
|
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||||
|
#define READ_UINT64(mem) GST_READ_UINT64_BE(mem)
|
||||||
|
#else
|
||||||
|
#define READ_UINT64(mem) GST_READ_UINT64_LE(mem)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* UDP/IP is assumed for bandwidth calculation */
|
/* UDP/IP is assumed for bandwidth calculation */
|
||||||
#define UDP_IP_HEADER_OVERHEAD 28
|
#define UDP_IP_HEADER_OVERHEAD 28
|
||||||
|
|
||||||
|
@ -236,8 +242,8 @@ check_header (GstBuffer * buffer, guint index)
|
||||||
* most likely be changed in gstrtpbin.
|
* most likely be changed in gstrtpbin.
|
||||||
*/
|
*/
|
||||||
fail_unless (info.data != NULL);
|
fail_unless (info.data != NULL);
|
||||||
fail_unless_equals_uint64 (*(guint64 *) info.data,
|
fail_unless_equals_uint64 (READ_UINT64 (info.data),
|
||||||
*(guint64 *) rtp_header[index]);
|
READ_UINT64 (rtp_header[index]));
|
||||||
fail_unless (*(guint16 *) (info.data + 12) ==
|
fail_unless (*(guint16 *) (info.data + 12) ==
|
||||||
*(guint16 *) (rtp_header[index] + 12));
|
*(guint16 *) (rtp_header[index] + 12));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue