From 4a99e1cf56e5fe65ca269f39bcb3b533fcf8eb7d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Wed, 13 Mar 2013 17:46:58 -0400 Subject: [PATCH] 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. --- tests/check/gst/mediafactory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.7.4