rtpbasedepayload: test warning fixes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/757>
This commit is contained in:
Havard Graff 2020-02-12 14:48:36 +01:00
parent 9a6730eee6
commit c488fd74a0

View file

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