[FFmpeg-devel] [PATCH] rtsp: Fallback to TCP if no packets are received over UDP

Martin Storsjö martin
Wed Jan 12 13:02:39 CET 2011


On Wed, 12 Jan 2011, Luca Barbato wrote:

> On 01/12/2011 12:16 PM, Martin Storsj? wrote:
> > This is somewhat fixed by the NAT punching 
> > code added last year, but people still have issues every now and then. The 
> > attached patchset implements fallback from UDP to TCP if we didn't receive 
> > any packets at all over UDP.
> 
> I like the refactoring part, I'm undecided on the automatic fallback,
> probably it's fine as well but I'm not absolutely sure if there are
> usecases that would break.

This only triggers once we'd return EOF, for the case where we're 
currently using UDP, and where no packets have been returned yet, so I 
think it should be quite safe. The code only does the fallback if both TCP 
and UDP are in the lower transport mask and if we're currently using UDP 
(which means TCP never was tried in the connect phase, if UDP succeeded). 
So if you specify ?udp, it wouldn't try to fallback either.

// Martin



More information about the ffmpeg-devel mailing list