From 36fec290a3ebff6cc3016983e173d264ff68d4ac Mon Sep 17 00:00:00 2001 From: Havard Graff Date: Tue, 7 Apr 2020 11:00:39 +0200 Subject: [PATCH] test/rtp: use the proper _INIT for initializing rtp/rtcp buffer structs. Fixes -Wmissing-field-initializers in Clang. Part-of: --- tests/check/libs/rtp.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/check/libs/rtp.c b/tests/check/libs/rtp.c index ff33455..de3aa8e 100644 --- a/tests/check/libs/rtp.c +++ b/tests/check/libs/rtp.c @@ -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); -- 2.7.4