Gstreamer RTSP server - finalize() doesn't delete io_channel watches...

Matthias Dodt MDodt at xion-medical.com
Thu Sep 29 02:48:38 PDT 2011


Hey guys!

I think the RTSP Server is missing some code in the finalize method. The
underlying IO channel doesn't get deleted (close is not called on the
socket) which prevents the server from running correctly after the
object has been destroyed and newly created once. I guess the watch on
the IO channel should be deleted and the refcount of the iochannel must
be decremented:

gst_rtsp_server_finalize (GObject *object)
{

...
//remove the io-watch
if(g_source_remove(server->io_watch)
{
	g_source_unref(server->io_watch);
}
else
{
	GST_ERROR_OBJECT (server, "failed to remove io watch");
}

//io channel should be deleted...
g_io_channel_unref(server->io_channel);
...

}

Feel free to add the code in future versions,

Cheers

mat


More information about the gstreamer-devel mailing list