From: Wim Taymans Date: Tue, 20 Nov 2012 11:29:55 +0000 (+0100) Subject: factory: keep ref to factory while media active X-Git-Tag: 1.19.3~495^2~1258 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=37a7ec8033511cc8950047daad7e28953b9f5fe9;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/gst/rtsp-server/rtsp-media-factory.c b/gst/rtsp-server/rtsp-media-factory.c index 1140e8b..29308c0 100644 --- a/gst/rtsp-server/rtsp-media-factory.c +++ b/gst/rtsp-server/rtsp-media-factory.c @@ -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); } } }