[FFmpeg-devel] [PATCH 5/5] rtspdec: Retry with TCP if UDP failed

Martin Storsjö martin
Mon Jan 24 22:02:27 CET 2011


On Mon, 24 Jan 2011, Ronald S. Bultje wrote:

> On Mon, Jan 24, 2011 at 5:49 AM, Martin Storsj? <martin at martin.st> wrote:
> > +static int resetup_tcp(AVFormatContext *s)
> > +{
> > + ? ?char host[1024];
> > + ? ?int port;
> > +
> > + ? ?av_url_split(NULL, 0, NULL, 0, host, sizeof(host), &port, NULL, 0,
> > + ? ? ? ? ? ? ? ? s->filename);
> > + ? ?ff_rtsp_undo_setup(s);
> > + ? ?// TODO: Handle the real_challenge for Real-RTSP
> > + ? ?return ff_rtsp_make_setup_request(s, host, port, RTSP_LOWER_TRANSPORT_TCP,
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?NULL);
> > +}
> 
> How do you test this?

For testing, I comment out the code for sending punch packets in rtsp.c, 
which makes UDP connections not work when behind a NAT.

> Can you try sending 2 SETUPs to any REAL server, see it fail, put a 
> TEARDOWN in the middle to show that that fixes it?

As discussed on irc, sending a teardown works fine if making sure a new 
subscribe is sent. Updated version of patch #5 attached.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-rtspdec-Retry-with-TCP-if-UDP-failed.patch
Type: text/x-diff
Size: 4589 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110124/aacf94e1/attachment.patch>



More information about the ffmpeg-devel mailing list