tests/avtp: Plug some (more) leaks

Some leaks were introduced in new tests - this patch fix them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1312>
This commit is contained in:
Ederson de Souza 2020-05-29 11:36:06 -07:00 committed by GStreamer Merge Bot
parent f685893ed2
commit 6caea9e19b
4 changed files with 14 additions and 0 deletions

View file

@ -160,6 +160,8 @@ GST_START_TEST (test_properties)
g_object_set (G_OBJECT (element), "drop-invalid", drop_invalid, NULL);
g_object_get (G_OBJECT (element), "drop-invalid", &val, NULL);
fail_unless (val == drop_invalid);
gst_object_unref (element);
}
GST_END_TEST;
@ -183,6 +185,7 @@ GST_START_TEST (test_crf_cvf_data)
test_crf_tstamps (h, buf, 218000, 119400, 2);
test_crf_tstamps (h, buf, 218000, 102000, 2);
gst_buffer_unref (buf);
gst_harness_teardown (h);
}
@ -206,6 +209,7 @@ GST_START_TEST (test_crf_aaf_data)
test_crf_tstamps (h, buf, 112900, 0, 2);
test_crf_tstamps (h, buf, 210000, 0, 2);
gst_buffer_unref (buf);
gst_harness_teardown (h);
}
@ -227,6 +231,7 @@ GST_START_TEST (test_crf_period_zero)
test_crf_tstamps (h, buf, 112, 110, 1);
gst_buffer_unref (buf);
gst_harness_teardown (h);
}

View file

@ -197,6 +197,8 @@ GST_START_TEST (test_properties)
g_object_set (G_OBJECT (element), "streamid", streamid, NULL);
g_object_get (G_OBJECT (element), "streamid", &val64, NULL);
fail_unless_equals_uint64_hex (val64, streamid);
gst_object_unref (element);
}
GST_END_TEST;
@ -221,6 +223,8 @@ GST_START_TEST (test_set_avtp_tstamp)
res = avtp_cvf_pdu_get (&pdu, AVTP_CVF_FIELD_TIMESTAMP, &tstamp);
fail_unless (res == 0);
fail_unless_equals_uint64 (tstamp, 12345);
g_object_unref (avtpcrfsync);
}
GST_END_TEST;
@ -243,6 +247,8 @@ GST_START_TEST (test_set_avtp_mr_bit)
res = avtp_cvf_pdu_get (&pdu, AVTP_CVF_FIELD_MR, &mr_bit);
fail_unless (res == 0);
fail_unless_equals_uint64 (mr_bit, 1);
g_object_unref (avtpcrfsync);
}
GST_END_TEST;

View file

@ -97,6 +97,8 @@ GST_START_TEST (test_get_avtp_tstamp)
AVTP_SUBTYPE_TSCF);
tstamp = get_avtp_tstamp (avtpcrfbase, &pdu);
fail_unless_equals_uint64 (tstamp, GST_CLOCK_TIME_NONE);
g_object_unref (avtpcrfbase);
}
GST_END_TEST;

View file

@ -182,6 +182,7 @@ GST_START_TEST (test_payloader_spread_ts)
for (i = 0; i < 10; i++) {
out = gst_harness_pull (h);
fail_unless_equals_uint64 (GST_BUFFER_DTS (out), first_tx_time);
gst_buffer_unref (out);
first_tx_time += measurement_interval / max_interval_frames;
}