test/rtp: use the proper _INIT for initializing rtp/rtcp buffer structs.

Fixes -Wmissing-field-initializers in Clang.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/757>
This commit is contained in:
Havard Graff 2020-04-07 11:00:39 +02:00
parent c488fd74a0
commit 36fec290a3

View file

@ -37,7 +37,7 @@ GST_START_TEST (test_rtp_buffer)
GstMapInfo map;
guint8 *data;
gsize size;
GstRTPBuffer rtp = { NULL, };
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
/* check GstRTPHeader structure alignment and packing */
buf = gst_rtp_buffer_new_allocate (16, 4, 0);
@ -264,7 +264,7 @@ GST_START_TEST (test_rtp_buffer_set_extension_data)
guint8 misc_data[4] = { 1, 2, 3, 4 };
gpointer pointer;
guint8 appbits;
GstRTPBuffer rtp = { NULL, };
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
/* check GstRTPHeader structure alignment and packing */
buf = gst_rtp_buffer_new_allocate (4, 0, 0);
@ -693,7 +693,7 @@ GST_START_TEST (test_rtcp_buffer)
{
GstBuffer *buf;
GstRTCPPacket packet;
GstRTCPBuffer rtcp = { NULL, };
GstRTCPBuffer rtcp = GST_RTCP_BUFFER_INIT;
gsize offset;
gsize maxsize;
@ -797,7 +797,7 @@ GST_START_TEST (test_rtcp_reduced_buffer)
{
GstBuffer *buf;
GstRTCPPacket packet;
GstRTCPBuffer rtcp = { NULL, };
GstRTCPBuffer rtcp = GST_RTCP_BUFFER_INIT;
gsize offset;
gsize maxsize;
@ -1603,7 +1603,7 @@ GST_START_TEST (test_rtp_ntp64_extension)
GstBuffer *buf;
gpointer data;
guint size;
GstRTPBuffer rtp = { NULL, };
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
guint8 bytes[] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0x01, 0x23, 0x45 };
guint64 ntptime;
guint8 hdrext_ntp64[GST_RTP_HDREXT_NTP_64_SIZE];
@ -1642,7 +1642,7 @@ GST_START_TEST (test_rtp_ntp56_extension)
GstBuffer *buf;
gpointer data;
guint size;
GstRTPBuffer rtp = { NULL, };
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
guint8 bytes[] = { 0x23, 0x45, 0x67, 0x89, 0x01, 0x23, 0x45 };
guint64 ntptime;
guint8 hdrext_ntp56[GST_RTP_HDREXT_NTP_56_SIZE];
@ -1684,7 +1684,7 @@ GST_START_TEST (test_rtp_buffer_get_extension_bytes)
guint size;
guint8 misc_data[4] = { 1, 2, 3, 4 };
gpointer pointer;
GstRTPBuffer rtp = { NULL, };
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
GBytes *gb;
gsize gb_size;
@ -1752,7 +1752,7 @@ GST_START_TEST (test_rtp_buffer_get_payload_bytes)
GstMapInfo map;
gconstpointer data;
gsize size;
GstRTPBuffer rtp = { NULL, };
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
GBytes *gb;
/* create empty RTP buffer, i.e. no payload */
@ -1799,7 +1799,7 @@ GST_END_TEST;
GST_START_TEST (test_rtp_buffer_empty_payload)
{
GstRTPBuffer rtp = { NULL };
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
GstBuffer *paybuf, *outbuf;
paybuf = gst_rtp_buffer_new_allocate (0, 0, 0);