rtspsrc: Fails to send EOS if server shuts down stream shortly after connection
Submitted by Joel Holdsworth
Created attachment 339536
10-second 10-FPS 240p H.264 Counter Video with GOP=1
Steps to reproduce...
- Get the attached video clip - or (seemingly) any short video clip.
The test video is a Counter Video; 10-seconds of 10FPS in H.264/MP4 with GOP=1 i.e. every frame is an I-frame. (However this problem has been observed with other short videos coded in both H.264 and MJPEG).
- Set up VLC as an RTSP server. (I'm testing with VLC v2.2.2)
a. Create a vlm.conf file like this:
b. Run cvlc:
$ cvlc --vlm-conf /path/to/vlm.conf
The VLC server should be ready to accept connections at 'rtsp://localhost:8554/counter' . Double check this is the case with VLC, mplayer, or whatever video player you prefer.
- Run gst-launch-1.0
a. With this command...
$ gst-launch-1.0 rtspsrc location="rtsp://localhost:8554/counter" ! decodebin ! videoconvert ! ximagesink
...if the first frame shown has the number <=51, the video will play through to then end, and shut down cleanly. gst-inspect-1.0 will print the message 'Got EOS from element "pipeline0".'
But if the first frame show >= 53, the video will get stuck on the final frame displayed which is 94, sometimes 95 (- for reasons unknown; I would expect 99, but that's not so important to me), and no EOS is ever sent.
b. With this command...
$ gst-launch-1.0 rtspsrc location="rtsp://localhost:8554/counter" ! fakesink
...the behaviour is the same, but with no indication of the frame number.
Looking at Wireshark, CVLC always sends a "Goodbye" message through RTCP. But if the connection is stuck, the rtspsrc never disconnects from RTSP.
Attachment 339536, "10-second 10-FPS 240p H.264 Counter Video with GOP=1":