Descriptors leak with gst-rtsp-server and python

Nicolas Dufresne nicolas.dufresne at
Fri Jun 5 13:57:09 PDT 2015

Le vendredi 05 juin 2015 à 13:04 -0700, aborilov a écrit :
> I found that if connect listener to rtsp_server event 'client
> -connected'(even
> empty method) descriptors are leak for each client connect-disconnet.
> After client disconnet, it left one CLOSE_WAIT connection.
> If I remove listener, then no leak, and method 
> gst_rtsp_client_finalize
> calls on every client disconnet. But with listener it never called.
> I found that there are no such problem in C.
> My simple test:
> from gi.repository import Gst, GObject, GstRtspServer
> Gst.init(None)
> rtsp_server = GstRtspServer.RTSPServer()
> rtsp_server.attach(None)
> def client_connected(client, context):
>     print "Client connected"
> rtsp_server.connect('client-connected', client_connected)
> factory = GstRtspServer.RTSPMediaFactoryURI()
> factory.set_uri('rtsp://rtsp.algont:4000/62wKYOvnazxrv3s8cLIfmr')
> factory.set_shared(True)
> rtsp_server.get_mount_points().add_factory('/good', factory)
> GObject.MainLoop().run()
> Please tell me how can I fix this? Or where to look for?

If you run gc.collect() before you leave your application, does it
"fix" the issue ?


p.s. you need to import gc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the gstreamer-devel mailing list