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.
This commit is contained in:
Olivier Crête 2013-03-13 17:46:58 -04:00
parent 025ac34580
commit 4a99e1cf56

View file

@ -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);