On Wed, Nov 29, 2017 at 3:14 PM, Martin Storsjö <mar...@martin.st> wrote: > On Wed, 29 Nov 2017, Tristan Matthews wrote: > >> Fix suggested by Luca Barbato. >> >> This was causing spurious EOFs when using -rtsp_transport udp, as >> reported in https://bugzilla.libav.org/show_bug.cgi?id=1103 >> --- >> libavformat/rtsp.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c >> index 17a25a310..8bf9d9e3c 100644 >> --- a/libavformat/rtsp.c >> +++ b/libavformat/rtsp.c >> @@ -1998,7 +1998,9 @@ static int udp_read_packet(AVFormatContext *s, >> RTSPStream **prtsp_st, >> } >> #if CONFIG_RTSP_DEMUXER >> if (rt->rtsp_hd && p[0].revents & POLLIN) { >> - return parse_rtsp_message(s); >> + if ((ret = parse_rtsp_message(s)) < 0) { >> + return ret; >> + } >> } >> #endif >> } else if (n == 0 && ++timeout_cnt >= MAX_TIMEOUTS) { >> -- >> 2.15.0 > > > Looks good, I think. I wonder why nobody has run into this until now though. >
I found a few similar looking issues when searching for "RTSP EOF". Most people just reported that they'd "fixed" the issue by forcing -rtsp_transport tcp. _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel