ffmpeg supposedly hangs if RTSP session id contains $ or +
|Reported by:||Sebastian Rasmussen||Owned by:|
|Cc:||email@example.com, firstname.lastname@example.org||Blocked By:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
Summary of the bug:
GStreamer got a bug report a while back where christian mentioned that ffmpeg hangs when RTSP session ids in gst-rtsp-server contain $ or +
Now, RFC 2326 actually does not state that characters can or should be URI-escaped in a session id, only that linear whitespace should be. However whitespace is not among the allowed characters in a session id, and neither is % which would be the result of URI-escaping.
Therefore GStreamer recently accepted a patch to refrain from URI-escaping the session id in the RTSP session header. Instead the argument is that ffmpeg should not hang if it encounters $ or + in the header. While I have not reproduced this myself I'm CCing christian who reported it. Finally I did quickly look at the RTSP header parsing code in ffmpeg and I fail to find any code that actually cares about the session id's constituing characters.
Perhaps the problem with $ is that the session id is mixed up with the $ used to separate multiple channels multiplexed over the same RTSP TCP connection? I'm far from certain about this, but at least it is part of the parsing and uses the same character as delimiter.
christian if you can still reproduce this, please chime in here and help out in getting a better fix for this problem.