GNOME Bugzilla – Bug 756441
rtspsrc never sends teardown with fakesink or appsink
Last modified: 2015-11-05 10:17:38 UTC
With a simple pipeline as this one : gst-launch-1.0.exe rtspsrc location=$STREAM ! fakesink -v When stopping with ctrl+c the last packet sent by gstreamer is a RTSP PAUSE, thus the server does not properly close the session.
Does it work better when using the -e parameter of gst-launch? But in general, rtspsrc IIRC just closes sockets ASAP without waiting for the teardown to be completely sent. Depending on other timing, it might or might not be sent. The server does not really need to close the connection, the client already does that and the server will get notified about that at the TCP level.
On the first try with -e, I got a teardown, but then I launched again the command 4 times, and no teardown. This is for me an issue, as the piece of hardware I'm using as a rtsp server does not handle the RTSP TCP close as a session end. Worse, when the client's OS sends ICMP port unreachable, the server seems to ignore that and keep sendings rtp packets for about 1 minute (I guess its a timeout serverside). I'm working both ways on this issue, trying to close properly the session client side, and working with the manufacturer of the server to get it patched, as I'm quickly saturating my link with unclosed rtsp sessions. In my case, I'm using a more complex pipeline with depayloader/decoder/appsink to feed my app with the stream, but I found that I could reproduce the behaviour with a simpler pipeline.
I guess a property on rtspsrc to make it wait for TEARDOWN to cause the server to close the connection would make sense. But in general you'd like the client to stop ASAP and not wait for the server.
Do you want to provide a patch for this?
With some guidance I could try ... but first I need to manage compiling gstreamer on windows.
*** This bug has been marked as a duplicate of bug 748360 ***