[vlc-devel] Patch to "modules/access/live555.cpp" to fix the recently-discovered RTSP subtitle track problem

Gilles Chanteperdrix gilles.chanteperdrix at xenomai.org
Mon Dec 16 14:22:46 CET 2013

On 12/16/2013 06:22 AM, Ross Finlayson wrote:
> Recently Gilles Chanteperdrix reported (on the wrong VLC mailing list
> :-) that attempting to enable a subtitle track in a RTSP stream would
> cause VLC (version 2.1) to halt the stream.
> The problem was introduced (to the file "modules/access/live555.cpp")
> between versions 2.0.9 and 2.1.0.  The problem was that when the code
> (the "Demux()" function) discovered that the subtitle track was
> disabled, it sent a RTSP "TEARDOWN" for that track.  Later, when the
> user tried to enable the track, the code would then try to turn the
> stream back on by sending RTSP "SETUP" and "PLAY" commands.  However,
> most servers will not handle this, because they will have handled the
> previous "TEARDOWN" command by completely shutting down the subtitle
> stream; not just disabling it.
> The following patch - to modules/access/live555.cpp - fixes this by
> disabling the track using a RTSP "PAUSE" command (rather than
> "TEARDOWN"), and reenabling the track using a RTSP "PLAY" command
> (rather than "SETUP"+"PLAY").


I have tried this patch, it fixes the issue if the sub-title track is
chosen quickly, if you wait too long before choosing the sub-titles, or
want to change track after some time, you stop receiving the sub-titles.
I believe the issue happens when going through NAT, and pausing the RTP
stream for long, the gateway stops the port forwarding, so the RTP
packet are sent by the server, but never received by the client behind a
NAT. I believe the "0xfeedface" packets should be sent again by the
client when "unpausing" a stream, or from time to time, to maintain the
port "liveness".



More information about the vlc-devel mailing list