http://ffmpeg.org/doxygen/trunk/rtsp_8c_source.html

Re guarding two things:

1) -

'rtsp_read_reply' - Seems to handle incorrectly the parsing of messages
during an interleaved communication, it also incorrectly looks for '$' when
it may not be used by the underlying transport e.g. in UDP.

Please consider a message which is formulated with a header like such:

"GET_PARAMATER rtsp://someuri/ RTSP/1.0\r\nCSeq:1\r\nDate:
xx:xx:xx\r\nContent-Length:24\r\n$UserAgent $009\r\n$\0\0\aRTSP/1.$\0\0\r\
n\r\nDatawith$IsNotAGoodIdea!\0\0"

This can cause VLC to enter a loop from which it may never recover from and
exit because of the code which required '$" to be the first octet in the
buffer / line.

The result is that the reply will be read again and again and the
underlying decoder sub-session will never get media and
will eventually timeout.

2) -
The polling code which is checking if each 'transportContext' has a flag to
'Revents' with `PollIn` nomenclature.

This is great, could use a few comments but it is simply great that we poll
as low as possible with a back-off when reading...

The only problem is that it's never reduced again when writing so that if
latency goes back down the polling for reading will not be shorter which,
will cause the player to think its latent again if the client catches up to
the server during that time and no data is readily available for a smaller
period of time then the poll timer allows.

You can test this using my server if you want

http://net7mma.codeplex.com/

You can create a session and then intentionally create delays when both
responding to requests and or sending rtcp messages or rtp packets and
output your delay to the console or in the response header and track how
the my library handles the backing off vs yours and what occurs when vlc
has accumulated a large 'pts_delay' which resolves itself.

I think that this can also causes a re-transmission for tcp if
'TCP_USER_TIMEOUT' is not set when reading and 'TCP_NO_DELAY' is not set
when writing(Which should probably also be polled for 'Revents' and
'Pollout' nomenclature.

The latest code for my project is not yet released but is much
more adaptable to this, I just wanted to ensure that I reported something
which I felt was incorrect in some cases.

Sincerely,
Julius
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to