summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Crête <olivier.crete@collabora.com>2013-03-13 21:46:58 (GMT)
committerOlivier Crête <olivier.crete@collabora.com>2013-03-13 21:47:44 (GMT)
commit4a99e1cf56e5fe65ca269f39bcb3b533fcf8eb7d (patch)
tree7bd24578476aeb9ef41f4e1a7806fae4ea99d531
parent025ac3458015a1dcc4cb20feece5ba7fa38e3c61 (diff)
downloadgst-rtsp-server-4a99e1cf56e5fe65ca269f39bcb3b533fcf8eb7d.tar.gz
gst-rtsp-server-4a99e1cf56e5fe65ca269f39bcb3b533fcf8eb7d.tar.xz
tests: Hold ref while creating second media
To test if the media aren't shared, make sure we keep the first one while creating a second otherwise the same memory address may be reused.
-rw-r--r--tests/check/gst/mediafactory.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/check/gst/mediafactory.c b/tests/check/gst/mediafactory.c
index e99af53..75667cf 100644
--- a/tests/check/gst/mediafactory.c
+++ b/tests/check/gst/mediafactory.c
@@ -78,11 +78,12 @@ GST_START_TEST (test_launch_construct)
media = gst_rtsp_media_factory_construct (factory, url);
fail_unless (GST_IS_RTSP_MEDIA (media));
- g_object_unref (media);
media2 = gst_rtsp_media_factory_construct (factory, url);
fail_unless (GST_IS_RTSP_MEDIA (media2));
fail_if (media == media2);
+
+ g_object_unref (media);
g_object_unref (media2);
gst_rtsp_url_free (url);