mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
check: gst_promise_reply() takes ownership
Copy the structure temporarily to check it further down. CID #1455392 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/472>
This commit is contained in:
parent
78b0baa7c9
commit
b6c9491c92
1 changed files with 2 additions and 1 deletions
|
@ -162,12 +162,13 @@ GST_START_TEST (test_reply_data)
|
||||||
r = gst_promise_new ();
|
r = gst_promise_new ();
|
||||||
|
|
||||||
s = gst_structure_new ("promise", "test", G_TYPE_INT, 1, NULL);
|
s = gst_structure_new ("promise", "test", G_TYPE_INT, 1, NULL);
|
||||||
gst_promise_reply (r, s);
|
gst_promise_reply (r, gst_structure_copy (s));
|
||||||
fail_unless (gst_promise_wait (r) == GST_PROMISE_RESULT_REPLIED);
|
fail_unless (gst_promise_wait (r) == GST_PROMISE_RESULT_REPLIED);
|
||||||
ret = gst_promise_get_reply (r);
|
ret = gst_promise_get_reply (r);
|
||||||
fail_unless (gst_structure_is_equal (ret, s));
|
fail_unless (gst_structure_is_equal (ret, s));
|
||||||
|
|
||||||
gst_promise_unref (r);
|
gst_promise_unref (r);
|
||||||
|
gst_structure_free (s);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
Loading…
Reference in a new issue