GNOME Bugzilla – Bug 765132
rtsp-server crash after last client is disconnected when media is shared
Last modified: 2016-04-16 09:04:59 UTC
Created attachment 326147 [details] [review] enabled media share When the last client is disconnected when media is shared, a crash occurs. The attached patch modifies examples/test-launch.c to enable media share. These is the gdb session: (lt-test-launch:12678): GStreamer-CRITICAL **: Trying to dispose element udpsrc1, but it is in PLAYING (locked) instead of the NULL state. You need to explicitly set elements to the NULL state before dropping the final reference, to allow them to clean up. This problem may also be caused by a refcounting bug in the application or some element. Program received signal SIGTRAP, Trace/breakpoint trap.
+ Trace 236183
Thread 140737196738304 (LWP 12686)
This is the offending commit: https://cgit.freedesktop.org/gstreamer/gst-rtsp-server/commit/?id=f62a9a7eb9fda096fb88c013d6787c28090037a2
I believe the problem is that because the media is shared, new udpsrc ports are allocated in the same stream: https://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/gst/rtsp-server/rtsp-stream.c#n1514 Then, when we leave the bin we are only setting the NULL state to udpsrc_v4[0] and udpsrc_v4[1]. https://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/gst/rtsp-server/rtsp-stream.c#n2938 But unfortunately we have lost the reference to the previous ones when the media is shared and there already was a first client Before this patch I believe we were keeping a list of all the transports.
Thanks for taking the time to report this. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 764744 ***