factory: keep ref to factory while media active

While the media from a factory is alive, keep a ref to the factory.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=663555
This commit is contained in:
Wim Taymans 2012-11-20 12:29:55 +01:00
parent 8fcdca987d
commit 37a7ec8033

View file

@ -653,8 +653,8 @@ gst_rtsp_media_factory_construct (GstRTSPMediaFactory * factory,
if (!gst_rtsp_media_is_reusable (media)) {
/* when not reusable, connect to the unprepare signal to remove the item
* from our cache when it gets unprepared */
g_signal_connect (media, "unprepared", (GCallback) media_unprepared,
factory);
g_signal_connect_object (media, "unprepared",
(GCallback) media_unprepared, factory, 0);
}
}
}