rtpbasedepayload: test warning fixes
authorHavard Graff <havard@pexip.com>
Wed, 12 Feb 2020 13:48:36 +0000 (14:48 +0100)
committerHavard Graff <havard@pexip.com>
Wed, 15 Jul 2020 14:57:01 +0000 (16:57 +0200)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/757>

tests/check/libs/rtpbasedepayload.c

index 37d4a3c..472692d 100644 (file)
@@ -120,7 +120,7 @@ static GstBuffer *
 gst_rtp_dummy_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
 {
   GstRtpDummyDepay *self = GST_RTP_DUMMY_DEPAY (depayload);
-  GstRTPBuffer rtp = { NULL };
+  GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
   GstBuffer *outbuf;
   guint32 rtptime;
   guint i;
@@ -278,12 +278,12 @@ validate_event (guint index, const gchar * name, const gchar * field, ...)
       gdouble expected = va_arg (var_args, gdouble);
       const GstSegment *segment;
       gst_event_parse_segment (event, &segment);
-      fail_unless_equals_uint64 (segment->applied_rate, expected);
+      fail_unless_equals_float (segment->applied_rate, expected);
     } else if (!g_strcmp0 (field, "rate")) {
       gdouble expected = va_arg (var_args, gdouble);
       const GstSegment *segment;
       gst_event_parse_segment (event, &segment);
-      fail_unless_equals_uint64 (segment->rate, expected);
+      fail_unless_equals_float (segment->rate, expected);
     } else if (!g_strcmp0 (field, "base")) {
       GstClockTime expected = va_arg (var_args, GstClockTime);
       const GstSegment *segment;
@@ -349,7 +349,7 @@ static void
 rtp_buffer_set_valist (GstBuffer * buf, const gchar * field, va_list var_args,
     gboolean * extra_ref_)
 {
-  GstRTPBuffer rtp = { NULL };
+  GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
   gboolean mapped = FALSE;
   gboolean extra_ref = FALSE;