summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOgnyan Tonchev <ognyan@axis.com>2014-01-31 15:02:22 +0100
committerWim Taymans <wtaymans@redhat.com>2014-02-04 14:47:49 +0100
commit274d4b017fe4967b616e67f8dfe40fb30bfb053e (patch)
tree79cc1205ac4e9b31f38c710e54a51731287be80e /tests
parent71c45fce5a50146ca799215874095679708872d3 (diff)
thread-pool: Unref reused threads in gst_rtsp_thread_stop()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=723519
Diffstat (limited to 'tests')
-rw-r--r--tests/check/gst/threadpool.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/check/gst/threadpool.c b/tests/check/gst/threadpool.c
index 735584a..4c6ca79 100644
--- a/tests/check/gst/threadpool.c
+++ b/tests/check/gst/threadpool.c
@@ -34,6 +34,8 @@ GST_START_TEST (test_pool_get_thread)
thread = gst_rtsp_thread_pool_get_thread (pool, GST_RTSP_THREAD_TYPE_CLIENT,
NULL);
fail_unless (thread != NULL);
+ /* one ref is hold by the pool */
+ fail_unless (GST_MINI_OBJECT_REFCOUNT (thread) == 2);
gst_rtsp_thread_stop (thread);
g_object_unref (pool);
@@ -62,6 +64,8 @@ GST_START_TEST (test_pool_get_thread_reuse)
fail_unless (thread2 != NULL);
fail_unless (thread == thread2);
+ /* one ref is hold by the pool */
+ fail_unless (GST_MINI_OBJECT_REFCOUNT (thread) == 3);
gst_rtsp_thread_stop (thread);
gst_rtsp_thread_stop (thread2);