rtsp-media: remove bus watch before finalizing
authorDavid Svensson Fors <davidsf@axis.com>
Mon, 19 Nov 2012 14:47:08 +0000 (15:47 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 20 Nov 2012 08:46:00 +0000 (09:46 +0100)
commit01973c924d3fc850b812a7aaf1b2691a8fd01ae0
tree77429976fb8ed72f8d3ba9a123bb1ed853f9a2a8
parent65042a9551a9cf4586d6e3fa49e6a10f25873553
rtsp-media: remove bus watch before finalizing

* A GDestroyNotify function is set for the bus watch in gst_rtsp_media_prepare.
* An extra media ref is added for the bus watch. This extra ref is unreffed by
the GDestroyNotify function.
* gst_rtsp_media_unprepare destroys the source so the bus watch is removed.
* GstRTSPClient, which calls gst_rtsp_media_prepare, also calls
gst_rtsp_media_unprepare before unreffing the media.

This way, the bus watch will be removed before the media is finalized.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=688707
gst/rtsp-server/rtsp-client.c
gst/rtsp-server/rtsp-media.c