mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
webrtcstats: Update unit test for outbound rtp stats
"remote-id" is not guaranteed to present after commit 1deb034e3d
.
Thus, we should not fail the test if "remote-id" is not found.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1998>
This commit is contained in:
parent
3e7fb83393
commit
f335b40ae8
1 changed files with 8 additions and 8 deletions
|
@ -1528,14 +1528,14 @@ validate_outbound_rtp_stats (const GstStructure * s, const GstStructure * stats)
|
|||
&packets_sent, NULL));
|
||||
fail_unless (gst_structure_get (s, "bytes-sent", G_TYPE_UINT64, &bytes_sent,
|
||||
NULL));
|
||||
fail_unless (gst_structure_get (s, "remote-id", G_TYPE_STRING, &remote_id,
|
||||
NULL));
|
||||
fail_unless (gst_structure_get (stats, remote_id, GST_TYPE_STRUCTURE, &remote,
|
||||
NULL));
|
||||
fail_unless (remote != NULL);
|
||||
if (gst_structure_get (s, "remote-id", G_TYPE_STRING, &remote_id, NULL)) {
|
||||
fail_unless (gst_structure_get (stats, remote_id, GST_TYPE_STRUCTURE,
|
||||
&remote, NULL));
|
||||
fail_unless (remote != NULL);
|
||||
|
||||
gst_structure_free (remote);
|
||||
g_free (remote_id);
|
||||
gst_structure_free (remote);
|
||||
g_free (remote_id);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1703,7 +1703,7 @@ GST_START_TEST (test_stats_with_stream)
|
|||
gst_caps_unref (caps);
|
||||
|
||||
test_webrtc_wait_for_answer_error_eos (t);
|
||||
fail_unless (t->state == STATE_ANSWER_SET);
|
||||
test_webrtc_signal_state (t, STATE_ANSWER_SET);
|
||||
|
||||
p = gst_promise_new_with_change_func (_on_stats, t, NULL);
|
||||
g_signal_emit_by_name (t->webrtc1, "get-stats", NULL, p);
|
||||
|
|
Loading…
Reference in a new issue