[FFmpeg-devel] [FFmpeg-cvslog] avformat/rtsp: support infinite initial_timeout for rtsp option

Andriy Gelman andriy.gelman at gmail.com
Mon Nov 9 20:42:46 EET 2020


On Mon, 09. Nov 12:52, Andriy Gelman wrote:
> Hi Limin, 
> 
> On Sat, 07. Nov 02:14, Limin Wang wrote:
> > ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Tue Nov  3 18:15:21 2020 +0800| [c8101aabee654f6d147a4d89f77fa73e18908610] | committer: Limin Wang
> > 
> > avformat/rtsp: support infinite initial_timeout for rtsp option
> > 
> > Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> > 
> > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c8101aabee654f6d147a4d89f77fa73e18908610
> > ---
> > 
> >  libavformat/rtsp.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
> > index 49c2d52375..4427bd268f 100644
> > --- a/libavformat/rtsp.c
> > +++ b/libavformat/rtsp.c
> > @@ -2049,7 +2049,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
> >                  }
> >              }
> >  #endif
> > -        } else if (n == 0 && --runs <= 0) {
> > +        } else if (n == 0 && rt->initial_timeout > 0 && --runs <= 0) {
> >              return AVERROR(ETIMEDOUT);
> >          } else if (n < 0 && errno != EINTR)
> >              return AVERROR(errno);
> 
> Please ping before applying. 

> 
> This breaks:
> ffplay -loglevel trace rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
> 

The link may work for you when you test. I'm behind a firewall that blocks udp
traffic, which is why the switch from udp to tcp is needed after a timeout. 

-- 
Andriy


More information about the ffmpeg-devel mailing list